Skip to main content
Glama

Priority — TypeScript Compiler Intelligence

Query Code

query_code
Read-onlyIdempotent

Free navigation for symbols, callers, callees or function facts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNo
limitNo
queryYes
offsetNo
symbolNo
compactNo
snapshotNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes
queryYes
totalYes
limitsYes
schemaYes
symbolNo
analyzerYes
coverageYes
returnedYes
snapshotYes
truncatedYes
next_offsetYes
total_foundYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed25 schema fields changed
    • addedInput schema / oneOf
      Added value: +[
      +  {
      +    "required": [
      +      "files"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "snapshot"
      +    ]
      +  }
      +]
    • removedInput schema / properties / compact / description
      Removed value: -"Return a token-efficient packet when the selected query supports it. Defaults to false for generic query_code to preserve the verbose packet contract."
    • removedInput schema / properties / files / description
      Removed value: -"Authorized JavaScript/TypeScript source files for this single request. Required every call — there is no server-side index."
    • removedInput schema / properties / files / items / properties / content / description
      Removed value: -"Full source text for that path. Only files included here are analyzed; the server does not read a repository from disk."
    • removedInput schema / properties / files / items / properties / path / description
      Removed value: -"Workspace-relative JS/TS path for this request (e.g. \"src/app.ts\"). No absolute paths, no \"..\" segments, no backslashes."
    • removedInput schema / properties / limit / description
      Removed value: -"Maximum number of items to return in this page (1–100). Prefer smaller pages when scanning large result sets."
    • removedInput schema / properties / offset / description
      Removed value: -"0-based pagination offset into the result items array. Use with limit and next_offset from the previous response."
    • removedInput schema / properties / query / description
      Removed value: -"Compiler query mode. Prefer specialized tools (find_references, analyze_impact, get_imports, get_importers) when intent is clear. Free modes: symbols, callers, callees, function. Paid modes: impact, references, imports, importers."
    • changedInput schema / properties / query / enum
      Previous value: -[
      -  "symbols",
      -  "callers",
      -  "callees",
      -  "function",
      -  "impact",
      -  "references",
      -  "imports",
      -  "importers"
      -]New value: +[
      +  "symbols",
      +  "callers",
      +  "callees",
      +  "function"
      +]
    • addedInput schema / properties / snapshot
      Added value: +{
      +  "maxLength": 100,
      +  "minLength": 20,
      +  "type": "string"
      +}
    • removedInput schema / properties / symbol / description
      Removed value: -"Required for callers/callees/function/impact/references/imports/importers. Omit only for query=symbols."
    • changedInput schema / required
      Previous value: -[
      -  "files",
      -  "query"
      -]New value: +[
      +  "query"
      +]
    • removedOutput schema / properties / analyzer / description
      Removed value: -"Analyzer identity including TypeScript version"
    • removedOutput schema / properties / coverage / description
      Removed value: -"Coverage and completeness markers for this analysis"
    • removedOutput schema / properties / items / description
      Removed value: -"Paged compiler facts for this query"
    • removedOutput schema / properties / limits / description
      Removed value: -"Human-readable analysis boundary statements"
    • removedOutput schema / properties / next_offset / description
      Removed value: -"Offset for the next page, or null when complete"
    • removedOutput schema / properties / query / description
      Removed value: -"Query mode that produced this packet"
    • removedOutput schema / properties / returned / description
      Removed value: -"Number of items in this page"
    • removedOutput schema / properties / schema / description
      Removed value: -"Packet schema id, e.g. semantic-reader/0.1"
    • removedOutput schema / properties / snapshot / description
      Removed value: -"Hash of the supplied file set for this request"
    • removedOutput schema / properties / symbol / description
      Removed value: -"Resolved target symbol summary when applicable"
    • removedOutput schema / properties / total / description
      Removed value: -"Total matching items before pagination caps in this response path"
    • removedOutput schema / properties / total_found / description
      Removed value: -"Total found before page slice"
    • removedOutput schema / properties / truncated / description
      Removed value: -"True when result caps truncated the set (fail-closed incomplete, not absence proof)"
  2. Changed1 schema field changed
    • addedInput schema / properties / compact
      Added value: +{
      +  "default": false,
      +  "description": "Return a token-efficient packet when the selected query supports it. Defaults to false for generic query_code to preserve the verbose packet contract.",
      +  "type": "boolean"
      +}
  3. Changed8 schema fields changed
    • addedInput schema / properties / files / description
      Added value: +"Authorized JavaScript/TypeScript source files for this single request. Required every call — there is no server-side index."
    • addedInput schema / properties / files / items / properties / content / description
      Added value: +"Full source text for that path. Only files included here are analyzed; the server does not read a repository from disk."
    • addedInput schema / properties / files / items / properties / path / description
      Added value: +"Workspace-relative JS/TS path for this request (e.g. \"src/app.ts\"). No absolute paths, no \"..\" segments, no backslashes."
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of items to return in this page (1–100). Prefer smaller pages when scanning large result sets."
    • addedInput schema / properties / offset / description
      Added value: +"0-based pagination offset into the result items array. Use with limit and next_offset from the previous response."
    • addedInput schema / properties / query / description
      Added value: +"Compiler query mode. Prefer specialized tools (find_references, analyze_impact, get_imports, get_importers) when intent is clear. Free modes: symbols, callers, callees, function. Paid modes: impact, references, imports, importers."
    • addedInput schema / properties / symbol / description
      Added value: +"Required for callers/callees/function/impact/references/imports/importers. Omit only for query=symbols."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "analyzer": {
      +      "description": "Analyzer identity including TypeScript version",
      +      "type": "string"
      +    },
      +    "coverage": {
      +      "additionalProperties": {},
      +      "description": "Coverage and completeness markers for this analysis",
      +      "type": "object"
      +    },
      +    "items": {
      +      "description": "Paged compiler facts for this query",
      +      "items": {
      +        "additionalProperties": {},
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "limits": {
      +      "description": "Human-readable analysis boundary statements",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "next_offset": {
      +      "description": "Offset for the next page, or null when complete",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "query": {
      +      "description": "Query mode that produced this packet",
      +      "type": "string"
      +    },
      +    "returned": {
      +      "description": "Number of items in this page",
      +      "type": "number"
      +    },
      +    "schema": {
      +      "description": "Packet schema id, e.g. semantic-reader/0.1",
      +      "type": "string"
      +    },
      +    "snapshot": {
      +      "description": "Hash of the supplied file set for this request",
      +      "type": "string"
      +    },
      +    "symbol": {
      +      "description": "Resolved target symbol summary when applicable"
      +    },
      +    "total": {
      +      "description": "Total matching items before pagination caps in this response path",
      +      "type": "number"
      +    },
      +    "total_found": {
      +      "description": "Total found before page slice",
      +      "type": "number"
      +    },
      +    "truncated": {
      +      "description": "True when result caps truncated the set (fail-closed incomplete, not absence proof)",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "schema",
      +    "analyzer",
      +    "snapshot",
      +    "query",
      +    "items",
      +    "total",
      +    "total_found",
      +    "returned",
      +    "truncated",
      +    "next_offset",
      +    "coverage",
      +    "limits"
      +  ],
      +  "type": "object"
      +}
  4. First observed

TDQS

C2/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the description adds no new behavioral information. It does not mention pagination, result size, or any other runtime characteristics beyond what the schema's limit/offset parameters imply.

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

Conciseness2/5

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

The description is a single short sentence, which is concise in word count but not appropriately sized for a tool with seven parameters and complex query semantics. It is under-specified rather than efficiently front-loaded.

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

Completeness1/5

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

Given the complexity (seven params, many siblings, and an output schema), the description is grossly incomplete. It does not explain the query types, the input modes (files vs snapshot), or the meaning of symbol, making it inadequate for an agent to call correctly.

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

Parameters1/5

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

Schema description coverage is 0%, so the description must compensate, but it fails to explain any of the seven parameters. It does not clarify what files vs snapshot means, what symbol refers to, or how compact and limit/offset work, leaving the agent entirely dependent on guessing from names and enums.

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

Purpose3/5

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

The description states the tool provides 'free navigation for symbols, callers, callees or function facts,' which maps to the query enum values. However, it is vague about what 'navigation' entails and does not differentiate it from siblings like find_symbol, get_definition, or find_references, which have more specific purposes.

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?

There is no guidance on when to use this tool versus the many siblings. The description does not mention any exclusions, conditions, or alternatives, leaving the agent to infer use cases from the vague 'free navigation' phrasing.

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