Skip to main content
Glama

get_source_code

Read Claude Code source files by specifying a relative path within src/. Optionally set a line range to extract up to 500 lines for targeted implementation details.

Instructions

Read actual Claude Code source code files. Use this to see implementation details referenced in module analysis. Supports line-range extraction. Returns at most 500 lines per call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesRelative path within src/ (e.g., 'entrypoints/cli.tsx', 'services/api/claude.ts'). A leading 'src/' prefix is also accepted and will be stripped automatically.
start_lineNoOptional: starting line number (1-based). Defaults to 1.
end_lineNoOptional: ending line number (1-based). Defaults to start_line + 499.
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses key behaviors: 'Supports line-range extraction' and 'Returns at most 500 lines per call.' This is good for a read tool, though it doesn't mention any potential limits on file paths (e.g., only within src/) or error cases.

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 (20 words total) convey the purpose, usage context, and a key constraint. No wasted words; front-loaded with the main verb and resource. Perfectly concise for this simple tool.

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?

For a read-only tool with 3 parameters and no output schema, the description is largely complete. It covers what the tool does, when to use it, and a key behavioral constraint. It could mention the return format (plain text?), but that is not essential given the simplicity. Slight gap: no mention of error handling or whether file path must be relative.

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 coverage is 100%, and the schema already describes all three parameters with clear descriptions. The description adds value only by summarizing ('Supports line-range extraction'), which is useful but not essential beyond the schema. Baseline 3 is appropriate.

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 uses a specific verb 'read' and explicitly states the resource ('actual Claude Code source code files'). It distinguishes from sibling tools like 'get_module' (module abstraction) and 'list_modules' by indicating this is for raw implementation details referenced in module analysis.

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?

The description provides clear context: 'Use this to see implementation details referenced in module analysis.' This implies when to use it relative to siblings. However, it does not explicitly state when not to use it or mention alternatives, so slight room for improvement.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/contradictory-body/cc-sensei'

If you have feedback or need assistance with the MCP directory API, please join our Discord server