Skip to main content
Glama

get_code_snippet

Retrieve the exact code snippet for any qualified symbol name from indexed GitHub repositories, optionally including neighboring code context.

Instructions

Run native CBM snippet lookup by qualified symbol name.

Input Schema

NameRequiredDescriptionDefault
projectNo
qualified_nameYes
include_neighborsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.4/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full disclosure burden. 'Lookup' implies a read, but it says nothing about return shape, cost, indexing requirements, or what include_neighbors does behaviorally, leaving key traits unstated.

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

Conciseness3/5

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

A single front-loaded sentence with no padding, which is good, but its brevity comes at the cost of under-specification rather than being efficient density.

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

Completeness2/5

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

For a 3-parameter tool with no annotations and no output schema, the description should explain scope semantics and return behavior. It leaves an agent unable to predict what the snippet response contains or what the boolean flag changes.

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

Parameters2/5

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

Schema description coverage is 0% across 3 parameters. The description only covers qualified_name via the phrase 'qualified symbol name' and says nothing about 'project' scoping or 'include_neighbors', so the undocumented parameters remain ambiguous.

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

Purpose3/5

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

The description states a verb ('run lookup') and resource ('code snippet') scoped by 'qualified symbol name', so the core action is inferable. However, 'native CBM snippet lookup' is unexplained jargon, and nothing distinguishes this from sibling tools such as search_code or read_snapshot_file.

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

Usage Guidelines2/5

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

There is no statement of when to use this instead of search_code or the other snapshot/graph readers. The phrase 'qualified symbol name' weakly implies it operates on indexed symbols, but no prerequisites, exclusions, or alternatives are given.

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