Skip to main content
Glama

code_outline

Read-onlyIdempotent

Analyzes C#, Python, TypeScript, and JavaScript source files to return structured code outlines—namespaces, types, members, signatures, and line ranges—without loading full content.

Instructions

PREFERRED METHOD: Analyzes source file(s) (C#, Python, TypeScript and JavaScript, including .tsx and .jsx) and returns structured metadata WITHOUT loading full content. Returns: namespace (module in Python and TypeScript), using directives (imports), types (classes, interfaces, records, enums, type aliases...), their members with signatures, attributes (decorators) and line ranges, module-level functions and variables, and the file classification. In TypeScript and JavaScript the functions declared inside a function (a React component's handlers and useCallback/useMemo values, a hook's helpers) are listed indented under it as local members. BATCH MODE: pass 'File1.cs,File2.py,File3.tsx' (comma-separated, NO SPACES) to analyze several files in one call, of any language. Use this BEFORE code_method to understand the structure, and instead of code_read for C#, Python, TypeScript and JavaScript files: it costs far fewer tokens than the full text. For other files use code_read. Set includePrivateMembers=true when debugging internals, analyzing dependency injection (constructors), refactoring private methods or needing the full class architecture; the default shows the public API only. The file is parsed from disk on every call, so the result is never stale.

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": {
      "workspace": "<workspace>",
      "relativeFilePath": "<relativeFilePath>"
    },
    "name": "code_outline"
  }
}

Input Schema

NameRequiredDescriptionDefault
guideNotrue: put the code guide first in the result. Use on your first code call, or when told it changed.
workspaceYesWorkspace name as shown in Waymark (a single workspace; '*' is not accepted)
relativeFilePathYesPath(s) of source file(s) (.cs, .py, .pyi, .ts, .tsx, .js, .jsx, .mts, .cts, .mjs, .cjs) relative to the workspace root. Single: 'Services/UserService.cs' | Batch: 'Services/UserService.cs,app/models/user.py,src/components/Table.tsx' (NO SPACES), any mix of languages
includePrivateMembersNoOptional: include non-public members (default false, public only)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds signal beyond that: the file is re-parsed from disk on every call so results are never stale, and the tool costs far fewer tokens than full text. It also describes the shape of the output in detail. The only gap is that it doesn't characterize failure behavior for unparseable or unsupported files.

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?

The 'PREFERRED METHOD' lead and the 'Returns:' enumeration are front-loaded and scannable, and the batch and private-member guidance follow in logical order. It is dense rather than bloated, though the batch comma-separation rule is stated both here and in the schema, which is mild duplication.

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?

There is no output schema, but the description fully enumerates the return contents including the TypeScript/JavaScript nested-function detail, so an agent knows what to expect. Combined with the annotations and 100% schema coverage, nothing needed for correct invocation is missing.

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 is 3, but the description adds real meaning: the batch syntax (comma-separated, NO SPACES, mixed languages) and the semantic distinction that includePrivateMembers defaults to public-API-only. The guide parameter is left to the schema, which documents it adequately.

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 ('Analyzes source file(s)... returns structured metadata') and enumerates the returned artifacts: namespace, imports, types, members with signatures, decorators, line ranges. It explicitly distinguishes itself from siblings by name ('instead of code_read', 'BEFORE code_method'), so an agent can select it without opening a schema.

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?

Gives explicit when-to-use ('BEFORE code_method', 'instead of code_read for C#, Python, TypeScript and JavaScript') and when-not ('For other files use code_read'), plus a conditional rule for includePrivateMembers covering debugging, DI constructors and refactoring. Both the positive and negative cases are named, not inferred.

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