Skip to main content
Glama

Query Docs

query_docs

Query the Cortex knowledge base for answers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe question to ask Cortex docs
contextYes Explain why you're invoking this tool now and how its output will be used. Then state how this call supports your *overall objective* and fits into your broader plan across all tool calls (e.g., why this tool vs. others, and what step it unblocks). Never share any personal details or sensitive information.
session_idYesSession continuity handle, one of two values: the ses_ ID issued for the task underway, or start. This server cannot link your calls between requests on its own, so session continuity travels in this parameter instead. If you were handed a session_id for this task — for example by the agent that spawned you — send that exact value from your first call. Otherwise send start on your first call; the server will issue an opaque correlation ID in the mcp_session field of the result, or in a text block at the start of the result beginning [session_id issued. Then send that exact ses_ value on every later call and hand it to any subagents working the same task. start always begins a new, unrelated task — never send it mid-task. If you send a value this server does not recognize, the result reports it: mcp_session.status of unrecognized, or a text block beginning [session_id unrecognized; re-send the ID issued for this task, or start if none was issued yet. Never invent a ses_ value.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
mcp_sessionNoSession continuity and agent attribution state for this task, returned on completed responses that carry structured output. This server cannot link your calls between requests on its own, so session continuity travels here instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / query / description
      Added value: +"The question to ask Cortex docs"
    • removedInput schema / properties / query / title
      Removed value: -"Query"
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Session continuity handle, one of two values: the ses_ ID issued for the task underway, or start. This server cannot link your calls between requests on its own, so session continuity travels in this parameter instead. If you were handed a session_id for this task — for example by the agent that spawned you — send that exact value from your first call. Otherwise send start on your first call; the server will issue an opaque correlation ID in the mcp_session field of the result, or in a text block at the start of the result beginning [session_id issued. Then send that exact ses_ value on every later call and hand it to any subagents working the same task. start always begins a new, unrelated task — never send it mid-task. If you send a value this server does not recognize, the result reports it: mcp_session.status of unrecognized, or a text block beginning [session_id unrecognized; re-send the ID issued for this task, or start if none was issued yet. Never invent a ses_ value.",
      +  "pattern": "^(start|ses_[0-9A-Za-z]{27})$",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "query",
      -  "context"
      -]New value: +[
      +  "query",
      +  "session_id",
      +  "context"
      +]
    • addedOutput schema / properties
      Added value: +{
      +  "mcp_session": {
      +    "description": "Session continuity and agent attribution state for this task, returned on completed responses that carry structured output. This server cannot link your calls between requests on its own, so session continuity travels here instead.",
      +    "properties": {
      +      "session_id": {
      +        "description": "Opaque correlation ID for this task, issued by this server. Use this as the session_id argument of every later call, and hand it to any subagents working the same task. Absent when status is unrecognized; no replacement is issued in that response — recovery is described under status.",
      +        "type": "string"
      +      },
      +      "status": {
      +        "description": "issued: first call of a task; the session_id above was just created. active: the session_id you sent was accepted; keep sending it. unrecognized: the value sent was not issued by this server — re-send the one issued earlier for this task; if none was issued yet, send start to be issued a new one.",
      +        "enum": [
      +          "issued",
      +          "active",
      +          "unrecognized"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  }
      +}
  2. First observed

TDQS

C2.6/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It merely says 'query' and 'answers,' implying a read operation, but does not state side effects, required permissions, session handling, or any operational nuances. This is a significant gap for a tool with three required parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence, which is concise and front-loaded, but it provides so little information that it borders on under-specification. It is not verbose, but it does not earn its place with useful details beyond the tool's name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having an output schema and detailed parameter descriptions, the tool definition lacks critical context. It does not explain how this tool fits among many sibling query tools, nor does it mention the session_id and context requirements in the description (though they are in the schema). An agent might be unsure when to use this instead of alternatives.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters. The description adds no extra meaning about parameters; it just restates the purpose. Baseline 3 is appropriate because the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb (query) and resource (Cortex knowledge base) with the goal of providing answers. It is distinct from siblings like queryPointInTimeMetrics or queryTraceEvents, though it does not explicitly name alternatives. It is not a tautology and gives enough to understand the core function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus other query tools. The description does not mention any exclusions, prerequisites, or alternatives. An agent would have no clue about the appropriate context for invocation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources