Skip to main content
Glama

get_topic_context

Retrieve a module's description, direct dependencies, and AST signatures from its attached files to understand code context and connections.

Instructions

Get one module's description, 1-hop dependencies, and AST signatures from its attached files.

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": {
      "topic": "<topic>"
    },
    "name": "get_topic_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
topicYesTopic ID or label to inspect
include_astNoWhether to include AST-extracted class/function signatures (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.3

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It discloses the returned components and the 1-hop depth limit, which is useful, but says nothing about permissions, behavior when the topic is unknown, cost/size of the AST payload, or whether the operation is strictly read-only.

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?

A single front-loaded sentence with no filler, and the three returned components are listed together for easy scanning. It is efficient, though the terseness leaves behavioral gaps that a slightly longer definition could have closed.

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?

For a two-parameter read tool with no output schema and no annotations, the description covers what is returned and the depth of dependency traversal. It stops short of error behavior, output shape, and any indication of payload size or prerequisites, which an agent would want before invoking 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 both parameters are already documented; the baseline of 3 applies. The description adds only marginal context by clarifying that the signatures come from attached files and that dependencies are 1-hop, without expanding on the 'topic' identifier format or what disabling include_ast affects.

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

Purpose4/5

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

The description gives a specific verb ('Get') and an enumerated resource: one module's description, 1-hop dependencies, and AST signatures from attached files. The 'one module' scoping distinguishes it reasonably well from get_architecture_summary and list_workspace_topics, though it never names those siblings explicitly.

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

Usage Guidelines3/5

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

Usage is only implied: 'one module' suggests per-topic inspection versus the workspace-level siblings, but there is no explicit when-to-use, when-not-to-use, or named alternative. An agent must infer the selection rule from the tool names.

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