Analyze Query (Research)
researchmcp-research_analyze_query
Analyse a research query into retrieval intent and (optionally) a date window.
Optional and composable — you do not have to call this before searching. The
search tools accept the same intent axes and start_date/end_date
directly, so you may derive them from your own reasoning, use this tool for
just one of intent or dates, or pass explicit dates and intent together
(explicit dates set the filter; intent always drives ranking).
Parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
query | string | yes | — | The full natural-language research query to analyse for topic/format intent and any time window. |
now | string | null | no | default: null | Anchor date for relative expressions like 'last 30 days'; defaults to today. Pass for reproducible results. |
Returns
- intent: the six axes (
article_types,topics,gender,season, year,moments), each a possibly-empty list of known slugs. Thread- these into the search tools' matching params.
- date_range: {start_date, end_date} (ISO YYYY-MM-DD, inclusive) for a
- genuinely temporal phrase (relative window, quarter, month range,
- single day), or null. A year, a season, or a named event is NOT returned as a
- date_range — it is surfaced in
intent(year/season/moments) - instead, and the search tools turn
year/momentsinto a window - automatically.
- interpretation: short human-readable summary of how the query parsed.
- is_inferred: true when a heuristic/LLM fallback or a future-date clamp
- was used — surface
interpretationto the user so they can confirm. - Errors:
- {"error": str} when a genuinely temporal phrase cannot be parsed (e.g.
- malformed input, unparseable model output) or the query is blank.
Try it
Loading interactive widget…
Code examples
- curl
- TypeScript
- Python
curl -s https://mcp.edited.com/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "MCP-Protocol-Version: 2025-06-18" \
-H "x-api-key: $MCP_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "researchmcp-research_analyze_query",
"arguments": {
"query": "Nike",
"now": null
}
}
}'
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
const client = new Client({ name: "demo", version: "1.0.0" }, { capabilities: {} });
await client.connect(
new StreamableHTTPClientTransport(new URL("https://mcp.edited.com/mcp"), {
requestInit: { headers: { "x-api-key": process.env.MCP_API_KEY ?? "" } },
}),
);
const result = await client.callTool({
name: "researchmcp-research_analyze_query",
arguments: {
"query": "Nike",
"now": null
},
});
import os
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client
headers = {"x-api-key": os.environ["MCP_API_KEY"]}
async with streamablehttp_client("https://mcp.edited.com/mcp", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
result = await session.call_tool(
"researchmcp-research_analyze_query",
{"query": "Nike", "now": None},
)
Input schema
{
"type": "object",
"properties": {
"query": {
"description": "The full natural-language research query to analyse for topic/format intent and any time window.",
"type": "string"
},
"now": {
"anyOf": [
{
"format": "date",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Anchor date for relative expressions like 'last 30 days'; defaults to today. Pass for reproducible results."
}
},
"required": [
"query"
]
}