Skip to main content
Glama

get_source_location

Retrieves the source file, line number, and function name from the halted CPU's program counter.

Instructions

Get the current source file and line of the halted CPU.

Returns the HLL source location (file:line) and enclosing function name for the current PC. The target must be halted and symbols must be loaded.

Returns: Formatted source location (file, line, function, module)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
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 preconditions (halted, symbols loaded) and the return format (file:line and function name). It does not describe error behavior, but the listed conditions are key behavioral traits.

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 description is concise with a clear structure: main purpose, preconditions, and return format. It is front-loaded and avoids unnecessary detail.

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?

Given zero parameters and the existence of an output schema, the description is complete. It covers purpose, preconditions, and returns, leaving no gaps for an agent to misuse the tool.

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?

The tool has no parameters, so baseline is 4. The description need not add parameter info; it correctly notes no arguments are needed.

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 clearly states the verb 'Get' and the resource 'current source file and line of the halted CPU', distinguishing it from sibling tools like get_current_function or get_callstack. It specifies the condition (halted CPU) and the result (source location and function name).

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 states explicit preconditions: 'The target must be halted and symbols must be loaded.' While it doesn't mention when not to use it or alternatives, this guidance is sufficient for correct usage.

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/YangPan2020/debugforge'

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