Skip to main content
Glama

Compile One-Shot Task Subgraph Context Pack

get_task_context
Read-onlyIdempotent

Compile a complete architectural context pack for a coding, bugfix, or refactoring task in one call. Resolve anchor symbols, trace side-effects and callers, and get a surgical file read plan before fetching code.

Instructions

Compile a complete, token-compact (<4 KB) architectural context pack for a coding, bugfix, or refactoring task in a single call. Use when starting a feature, bugfix, or refactoring task to get the full architectural subgraph upfront before calling find_symbol or fetch_code_snippets. Given a natural-language task symptom, route, or domain keywords, resolves diversified anchor services/controllers/methods, expands 1-hop outbound side-effects (caches, queues, external calls) and inbound callers/endpoints, computes canonical owner services for every touched database table, checks module import cycle safety, flags ratcheted legacy debt traps in touched files, and returns a surgical file read plan.

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": {
      "query": "<query>"
    },
    "name": "get_task_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesRequired task symptom, feature description, route, or space-separated domain keywords (e.g. 'revoke api key usage limit' or 'DELETE /oauth/register/:clientId').
maxAnchorsNoMaximum number of diversified anchor symbols to include across matched concepts (3 to 15; default: 8).
includeGatesNoWhen true, includes active Semantic Invariant Gates and flags any ratcheted legacy debt traps inside the matched subgraph files. Default: true.
workspacePathNoOptional absolute path to the target workspace root directory. Omit to use the bound workspace, active client root, or sticky session workspace.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.90.4

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered. The description still adds real substance: the fixed output budget (<4 KB), the one-hop expansion scope, owner-service resolution for tables, cycle checking, and debt-trap flagging. It stops short of consequences for the alternate workspacePath resolution or what happens when no anchors match.

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

Conciseness5/5

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

Two sentences: the first front-loads value and the size guarantee, the second covers when-to-use and the pipeline. Despite the long second sentence, every clause names a distinct capability an agent would otherwise have to discover.

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

Completeness4/5

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

There is no output schema, so the description must describe the return, and it does conceptually: anchors, outbound side-effects, inbound callers, table owners, cycle safety, debt traps, and a file read plan. It does not describe the pack's structure or how the read plan is ordered, which is the main remaining gap for a no-output-schema tool.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline would be 3; the description earns a bump by explaining that query accepts a natural-language symptom, a route, or space-separated keywords, and that anchors are 'diversified.' It also ties includeGates to legacy debt traps, adding meaning the schema does not carry alone.

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

Purpose5/5

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

States a specific verb and resource ('Compile a complete, token-compact (<4 KB) architectural context pack') plus the task classes it serves. It also distinguishes itself from siblings by positioning the call before find_symbol and fetch_code_snippets.

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?

Gives explicit trigger conditions ('Use when starting a feature, bugfix, or refactoring task') and orders the call relative to named alternatives. It does not state when to skip this tool in favor of other analysis siblings, but the sequencing guidance is clear enough to act on.

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