search_stack_overflow
Find verified programming solutions by querying the Stack Overflow API with an error signature, returning relevant discussions and answers with excerpts.
Instructions
Queries the public Stack Overflow / Stack Exchange API for verified programming solutions and discussions matching an error signature.
• Side Effects: None. Strictly read-only network search; does not mutate local files or repository state. • Auth & Permissions: No API key required for standard rate-limited anonymous queries. • Rate Limits: Subject to public Stack Exchange API rate limits (~300 requests/day per IP). Results are cached locally when possible. • Return Shape: Returns a JSON object containing 'query', 'total_results', and 'results' (array of objects with title, url, score, is_answered, answer_count, and answer excerpt). • Failure Modes: Returns empty results array if no matching questions exist. Returns an error message if network connectivity fails or API quota is exhausted. • When to use: Use when local code context from get_error_context is insufficient and external community patterns, known library bugs, or API migration examples are needed. • When NOT to use: Do NOT use with raw un-sanitized logs containing private tokens or file paths, do NOT use for local codebase inspection (use get_error_context), and do NOT use to edit code (use apply_code_patch). • Prerequisites: Outbound HTTP internet access to api.stackexchange.com.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Targeted search query string (e.g. 'ValueError: unsupported operand type(s) for +: int and str'). Must be free of project-specific paths, private tokens, or proprietary variable names. 3 to 150 characters recommended. |