Skip to main content
Glama

aiworkhub_manager_source_graph_query

Read-only

Query a source graph to discover code structure, dependencies, and impact before file searches, so you can target code discovery, analysis, and review.

Instructions

MANAGER CODE DISCOVERY: use first and continuously before built-in file search.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mode": "<mode>",
      "query": "<query>"
    },
    "name": "aiworkhub_manager_source_graph_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesLookup to run: focus, slice, context, file, function, class, body, bodygrep, impact, trace, deps, bundle, diff (a registered worker worktree's changed files, symbols and paged hunks), or an analytic report (hotspots, churn, testmap, calls, ...).
queryYesWhat to look up, non-blank, at most 512 bytes; its meaning depends on mode. In file mode with an exact file target, a 1-based start-end line range returns exactly those lines.
budgetNoSize budget for the reply; default 64, clamped to 8-160.
cursorNoPage token for analytic modes, bodygrep and diff only (at most 64 bytes, 4096 for bodygrep, 256 for diff): pass the previous next_cursor back unchanged; other modes refuse it.
targetNoOptional scope, at most 256 bytes: an exact symbol (bare name or file.symbol) for slice, body and function modes, the worker request id for diff, otherwise a path prefix; omit for unscoped.
request_idNoOptional review_ready worker request id; queries then read that sealed candidate (authority_source=candidate_overlay) composed over canonical, read-only. An unknown, not review_ready or drifted request returns ok=false, never canonical. Omit for canonical.
bundle_typeNoUsed only by bundle mode: bugfix, feature, refactor, audit, optimize or explore (default).explore
workflow_stageNoStage of the work this query supports: orientation, implementation, validation, review, rework or unspecified (default; the server infers the stage).unspecified
continuation_cursorNoSigned token, at most 1024 bytes, from a previous page of the same query whose response exceeded the output cap; not a bodygrep cursor.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.12.77
    • changedInput schema / properties / query / description
      Previous value: -"What to look up, non-blank, at most 512 bytes; its meaning depends on mode. In file mode with an exact file target, a 1-based start-end line range returns those lines plus a 20-line margin."New value: +"What to look up, non-blank, at most 512 bytes; its meaning depends on mode. In file mode with an exact file target, a 1-based start-end line range returns exactly those lines."
  2. Changed4 schema fields changedv0.12.74
    • changedInput schema / properties / cursor / description
      Previous value: -"Page token for analytic modes and bodygrep only (at most 64 bytes, 4096 for bodygrep): pass the previous next_cursor back unchanged; other modes refuse it."New value: +"Page token for analytic modes, bodygrep and diff only (at most 64 bytes, 4096 for bodygrep, 256 for diff): pass the previous next_cursor back unchanged; other modes refuse it."
    • changedInput schema / properties / mode / description
      Previous value: -"Lookup to run: focus, slice, context, file, function, class, body, bodygrep, impact, trace, deps, bundle, or an analytic report (hotspots, churn, testmap, calls, ...)."New value: +"Lookup to run: focus, slice, context, file, function, class, body, bodygrep, impact, trace, deps, bundle, diff (a registered worker worktree's changed files, symbols and paged hunks), or an analytic report (hotspots, churn, testmap, calls, ...)."
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "focus",
      -  "slice",
      -  "context",
      -  "file",
      -  "function",
      -  "class",
      -  "body",
      -  "bodygrep",
      -  "impact",
      -  "trace",
      -  "deps",
      -  "bundle",
      -  "tags",
      -  "hotspots",
      -  "coverage",
      -  "churn",
      -  "reviewqueue",
      -  "ownership",
      -  "testmap",
      -  "calls",
      -  "symbols",
      -  "bottlenecks",
      -  "auditmap",
      -  "complexity",
      -  "stats",
      -  "summarize",
      -  "pipeline",
      -  "todo",
      -  "leaks",
      -  "nullrisks",
      -  "rawptrs",
      -  "casts",
      -  "crashes",
      -  "looprisks",
      -  "deadmethods",
      -  "duplicates",
      -  "gaps"
      -]New value: +[
      +  "focus",
      +  "slice",
      +  "context",
      +  "file",
      +  "function",
      +  "class",
      +  "body",
      +  "bodygrep",
      +  "impact",
      +  "trace",
      +  "deps",
      +  "bundle",
      +  "diff",
      +  "tags",
      +  "hotspots",
      +  "coverage",
      +  "churn",
      +  "reviewqueue",
      +  "ownership",
      +  "testmap",
      +  "calls",
      +  "symbols",
      +  "bottlenecks",
      +  "auditmap",
      +  "complexity",
      +  "stats",
      +  "summarize",
      +  "pipeline",
      +  "todo",
      +  "leaks",
      +  "nullrisks",
      +  "rawptrs",
      +  "casts",
      +  "crashes",
      +  "looprisks",
      +  "deadmethods",
      +  "duplicates",
      +  "gaps"
      +]
    • changedInput schema / properties / target / description
      Previous value: -"Optional scope, at most 256 bytes: an exact symbol (bare name or file.symbol) for slice, body and function modes, otherwise a path prefix; omit for unscoped."New value: +"Optional scope, at most 256 bytes: an exact symbol (bare name or file.symbol) for slice, body and function modes, the worker request id for diff, otherwise a path prefix; omit for unscoped."
  3. Changed1 schema field changedv0.12.72
    • addedInput schema / properties / request_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional review_ready worker request id; queries then read that sealed candidate (authority_source=candidate_overlay) composed over canonical, read-only. An unknown, not review_ready or drifted request returns ok=false, never canonical. Omit for canonical.",
      +  "title": "Request Id"
      +}
  4. Changed8 schema fields changedv0.12.67
    • addedInput schema / properties / budget / description
      Added value: +"Size budget for the reply; default 64, clamped to 8-160."
    • addedInput schema / properties / bundle_type / description
      Added value: +"Used only by bundle mode: bugfix, feature, refactor, audit, optimize or explore (default)."
    • addedInput schema / properties / continuation_cursor / description
      Added value: +"Signed token, at most 1024 bytes, from a previous page of the same query whose response exceeded the output cap; not a bodygrep cursor."
    • addedInput schema / properties / cursor / description
      Added value: +"Page token for analytic modes and bodygrep only (at most 64 bytes, 4096 for bodygrep): pass the previous next_cursor back unchanged; other modes refuse it."
    • addedInput schema / properties / mode / description
      Added value: +"Lookup to run: focus, slice, context, file, function, class, body, bodygrep, impact, trace, deps, bundle, or an analytic report (hotspots, churn, testmap, calls, ...)."
    • addedInput schema / properties / query / description
      Added value: +"What to look up, non-blank, at most 512 bytes; its meaning depends on mode. In file mode with an exact file target, a 1-based start-end line range returns those lines plus a 20-line margin."
    • addedInput schema / properties / target / description
      Added value: +"Optional scope, at most 256 bytes: an exact symbol (bare name or file.symbol) for slice, body and function modes, otherwise a path prefix; omit for unscoped."
    • addedInput schema / properties / workflow_stage / description
      Added value: +"Stage of the work this query supports: orientation, implementation, validation, review, rework or unspecified (default; the server infers the stage)."
  5. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds no behavioral context beyond the usage directive—nothing about mode behavior, pagination, cursor handling, or the candidate overlay semantics that the schema documents. It neither contradicts nor enriches the annotations.

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

Conciseness4/5

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

It is a single front-loaded sentence with no wasted words, and the usage instruction is placed first. However, for a tool with 39 modes and nine parameters, this level of brevity borders on under-specification rather than pure conciseness.

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

Completeness3/5

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

An output schema exists and the input schema is fully described, so return values and parameter behavior need not be repeated. Still, the description gives no indication of the source-graph nature of the tool or its analytic modes, leaving an agent to infer the tool's role from the name and schema alone.

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 nine parameters, enums, and mode semantics are already fully documented in the schema. The description adds no parameter meaning beyond that, which is the expected baseline when the schema does all the work.

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 labels the tool as 'MANAGER CODE DISCOVERY' but never states a specific verb or resource such as 'query the source graph' or what kind of code facts it returns. It distinguishes itself from built-in file search, but not from sibling tools like context_graph_search or kb_search.

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

Usage Guidelines4/5

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

It gives a clear usage directive: use this first and continuously before built-in file search. That is explicit about when to reach for it, though it does not name when-not to use it or which sibling tools are alternatives for other lookup needs.

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

Deploy Server

Other Tools