Stack Overflow MCP server for LLM applications
The server provides 4 tools for Stack Overflow search and retrieval. All tools are properly registered with names, descriptions, and input schemas. However, several quality issues reduce the score: (1) Parameter descriptions are often generic and lack actionable constraints (e.g., 'Free-form search query' vs specifying character limits or examples of valid queries). (2) Output schema is not explicitly documented in the source code, the function signatures return 'str' (formatted response) but the structure of what the formatter produces is not visible. (3) The `response_format` parameter accepts 'json' or 'markdown' but lacks an enum constraint and the description doesn't explain the difference or when to use each. (4) Error handling is present (try/except with RuntimeError) but the error messages are generic, they don't guide the LLM toward recovery steps. (5) Date parameters (`from_date`, `to_date`) use `Optional[datetime]` in the signature but descriptions state only 'Earliest creation date' without explaining the expected format or how the API will serialize/deserialize. (6) The `sort_by` parameter mentions valid values in the description ('activity, creation, votes, relevance') but this should be an enum in the schema for machine-parseable clarity. (7) No tool declares idempotency, read-only status, or permission requirements in structured annotations. (8) The server uses a lifespan context pattern correctly but does not demonstrate per-request metadata or logLevel support in the current spec. Overall, the tools are functional and naming is clear (verb_noun pattern is followed), but parameter documentation and output contracts fall short of production standards.
Advanced search for Stack Overflow questions with many filter options.
Get a specific Stack Overflow question by ID with optional comments.
Search Stack Overflow for solutions to an error message
Search Stack Overflow for questions matching a query.
Output schema not documented. Functions return 'str' (formatted response) but the structure of formatted results is not visible in the provided source. LLMs cannot plan downstream actions or extract structured data without knowing what fields to expect.
Parameter enums not declared in schema. The 'sort_by' parameter description lists valid values as free text ('activity, creation, votes, relevance') rather than using a proper enum constraint. This allows hallucinated values like 'popularity' or 'trending' to reach the API. The 'response_format' parameter ('json' or 'markdown') has the same issue.
Error messages are generic and do not guide recovery. The RuntimeError messages ('Failed to search Stack Overflow: <error>') give the LLM no actionable next step. Per the recovery-guide pattern, errors should indicate: is this retryable? Should the user be asked? What alternative tools exist?
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 56 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 45 | - | v1 |
Parameter descriptions lack actionable constraints. Examples: 'Free-form search query' (what is the character limit? Can it be empty?), 'Earliest creation date' (what format? ISO 8601? Unix timestamp?). Per the tool-description pattern, descriptions should include expected format, range, and allowed values.
No tool annotations (readOnlyHint, idempotentHint). Per current spec (2026-07-28), tools should declare whether they are read-only or have side effects. All four tools are read-only (querying Stack Overflow), but this is not formally declared in the tool schema.
Date parameters lack format specification. 'from_date' and 'to_date' are typed as Optional[datetime] in Python but the description does not explain how they are serialized (ISO 8601? Epoch seconds?) or what the API expects. LLMs may pass invalid formats.
Pagination not fully documented. The 'limit' parameter exists but there is no mention of offset, page, or next_cursor for retrieving subsequent results. Users searching for Stack Overflow questions likely want to iterate through results, the tool should document how to fetch pages 2, 3, etc.
No result limit cap or rationale. The 'limit' parameter defaults to 5 but has no min/max specified. An LLM could request 10,000 results, potentially exhausting the Stack Exchange API quota or returning unusable context. The description should state the hard cap.