search_by_query
Search Stack Overflow for questions matching a query, with filters for tags, score, accepted answers, and more. Returns results in JSON or Markdown.
Instructions
Search Stack Overflow for questions matching a query.
Args:
query (str): The search query
tags (Optional[List[str]]): Optional list of tags to filter by (e.g., ["python", "pandas"])
excluded_tags (Optional[List[str]]): Optional list of tags to exclude
min_score (Optional[int]): Minimum score threshold for questions
title (Optional[str]): Text that must appear in the title
body (Optional[str]): Text that must appear in the body
has_accepted_answer (Optional[bool]): Whether questions must have an accepted answer
answers (Optional[int]): Minimum number of answers
sort_by (Optional[str]): Field to sort by (activity, creation, votes, relevance)
include_comments (Optional[bool]): Whether to include comments in results
response_format (Optional[str]): Format of response ("json" or "markdown")
limit (Optional[int]): Maximum number of results to return
ctx (Context): The context is passed automatically by the MCP
Returns:
str: Formatted search results
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| tags | No | ||
| excluded_tags | No | ||
| min_score | No | ||
| title | No | ||
| body | No | ||
| has_accepted_answer | No | ||
| answers | No | ||
| sort_by | No | votes | |
| include_comments | No | ||
| response_format | No | markdown | |
| limit | No |