Skip to main content
Glama

get_source

Retrieve PHP source code from files or specific line ranges for debugging analysis with Xdebug.

Instructions

Get the source code of a file or a specific line range

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesFile path to get source from
begin_lineNoStarting line number
end_lineNoEnding line number
session_idNoSession ID
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 burden of behavioral disclosure. While 'Get' implies a read operation, the description doesn't specify whether this requires an active debugging session, what permissions are needed, whether it can retrieve source from remote files, or what happens with invalid file paths. For a tool with 4 parameters and no annotation coverage, this is insufficient.

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?

The description is extremely concise at just 10 words, front-loaded with the core purpose, and contains zero wasted words. Every element of the description contributes directly to understanding the tool's function.

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 tool with 4 parameters, no annotations, no output schema, and operating in a complex debugging context with many sibling tools, the description is inadequate. It doesn't explain the relationship to sessions, what format the source code returns in, error conditions, or how it integrates with the debugging workflow represented by sibling tools.

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 the schema already documents all parameters. The description mentions 'file' and 'specific line range' which aligns with the 'file', 'begin_line', and 'end_line' parameters, but doesn't add meaningful semantics beyond what the schema provides. The 'session_id' parameter's purpose remains unclear from both schema and description.

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 clearly states the tool's purpose with a specific verb ('Get') and resource ('source code of a file or a specific line range'). It distinguishes from many sibling tools that perform debugging operations like breakpoints or profiling, but doesn't explicitly differentiate from potential similar read operations like 'get_variable' or 'get_contexts'.

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?

The description provides no guidance on when to use this tool versus alternatives. With many sibling tools available for debugging operations, there's no indication of whether this is for source code inspection during debugging, for standalone file reading, or how it relates to tools like 'get_variables' or 'get_contexts'.

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/kpanuragh/xdebug-mcp'

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