Skip to main content
Glama

ctx_outline

Read-only

Generate a compact file outline with declarations, signatures, line ranges, and import counts before reading the full file. Cap returned tokens with a budget to reduce context usage.

Instructions

Skeleton of one file: declarations and signatures with line ranges, first line of doc comments, imports collapsed to a count. Usually a small fraction of the file. Use before reading a file.

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": {
      "path": "<path>"
    },
    "name": "ctx_outline"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFile path relative to the project root.
budget_tokensNoHard cap on the tokens returned (estimate; default 2000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered; the description adds real behavioral detail by specifying the shape of the returned skeleton and that it is 'usually a small fraction of the file', setting size expectations. It does not mention truncation behaviour or what happens when budget_tokens is hit, but the read-only profile and output shape are clear.

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 short sentences, front-loaded with the output contract before the usage cue. No filler, no repetition of structured fields.

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?

With no output schema, the description correctly carries the burden of describing what comes back, which it does concretely. Only minor gaps remain around budget truncation behaviour for a 2-parameter read-only tool.

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%, with both path and budget_tokens documented in the schema, so the baseline applies. The description adds no syntax, path-resolution detail, or guidance on setting budget_tokens beyond what the schema already says.

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 precisely what is produced for a single file: declarations and signatures with line ranges, first doc-comment lines, and imports collapsed to a count. That is a specific content contract, not a restatement of the name, and 'one file' plus 'before reading a file' implicitly separates it from ctx_read.

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 an explicit placement cue — 'Use before reading a file' — which tells the agent to orient with this tool rather than dumping a full file. It stops short of naming an exclusion or an alternative for cases where the skeleton is insufficient (e.g. when to fall back to ctx_read or ctx_symbol).

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