Skip to main content
Glama

resolve_context_bundle

Read-onlyIdempotent

Builds a token-pruned Markdown context bundle by calculating dependency graph distances for an active target file. Use it to orient before editing in multi-module projects.

Instructions

Calculate topological dependency graph distances (D0 full target, D1 interface stubs, D2 nominal symbols) for an active target file and compile a token-pruned Markdown context bundle. Use this as your primary context builder before editing a file in a multi-module project. For inspecting isolated files, use prune_file instead. Read-only operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
target_fileYesPath to the active target file in editing (D0)
project_rootNoRoot directory of the project. Defaults to target file's directory.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesCompiled topological Markdown prompt context bundle
isErrorYesTrue if dependency resolution or file traversal failed

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.5.6
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "content": {
      +      "description": "Compiled topological Markdown prompt context bundle",
      +      "items": {
      +        "properties": {
      +          "text": {
      +            "description": "Token-optimized Markdown context bundle",
      +            "type": "string"
      +          },
      +          "type": {
      +            "enum": [
      +              "text"
      +            ],
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "text"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "isError": {
      +      "description": "True if dependency resolution or file traversal failed",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "content",
      +    "isError"
      +  ],
      +  "type": "object"
      +}
  2. First observedv3.5.0

TDQS

A4.5/5.0
Behavior4/5

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

The annotations already cover read-only, idempotent, and non-destructive behavior, so the description does not need to restate safety. It adds meaningful behavioral context beyond annotations by specifying the D0/D1/D2 distance levels and the token-pruned Markdown output format. The 'Read-only operation' sentence is redundant with annotations but not contradictory.

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?

Three sentences with no wasted words. The core function is front-loaded, usage context follows, and the alternative tool is named in the final sentence. The only minor redundancy is 'Read-only operation,' but it is one short clarifying phrase.

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

Completeness5/5

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

For a read-only context-building tool with full schema description coverage and an output schema, the description covers purpose, usage timing, alternatives, and output format. An agent has all necessary information to decide when to call it and what to expect from it.

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 both target_file and project_root. The description reinforces target_file's role as the active target file but adds no new parameter-level meaning, such as how project_root affects traversal or what values are valid.

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?

The description states a specific verb-resource pair: it calculates topological dependency graph distances and compiles a token-pruned Markdown context bundle. It also differentiates itself from prune_file by framing itself as the primary context builder, so an agent can select it confidently without inspecting siblings.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use guidance: 'primary context builder before editing a file in a multi-module project.' It also names the alternative for isolated files: 'use prune_file instead.' This is direct, actionable routing guidance.

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