Skip to main content
Glama

trace_calls

Start tracing function calls on a module and get a file path to review the captured trace entries.

Instructions

Start tracing function calls on a module. This tool does NOT return the trace results directly — it writes them to a file and returns the file path.

WORKFLOW:

  1. Call this tool → you get back a file path (e.g. /tmp/beam_scope_traces/MyModule_20260323_221503.log)

  2. Wait a few seconds for the trace to collect events

  3. Read the file using your normal file reading tools (Read tool) to see the trace results

  4. The trace auto-stops when it hits max_calls or max_seconds — you do NOT need to call stop_trace

WHY A FILE: Traces collect events over time and can be large. Writing to a file lets you read just the parts you need (head, tail, grep for patterns).

The file contains timestamped entries like: [22:15:03.001] #1 #PID<0.599.0> MyModule.my_function("arg1", 42)

All parameters except function are REQUIRED. max_calls capped at 200, max_seconds capped at 30.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
moduleYesModule to trace (e.g. "Merlinex.Core.Manager"). Required.
functionNoSpecific function name (optional — omit to trace all functions in the module)
max_callsYesStop after this many calls (required, max 200)
max_secondsYesStop after this many seconds (required, max 30)
Behavior5/5

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

With no annotations, the description carries full behavioral disclosure. It reveals that the tool is asynchronous (writes to a file and returns a path), auto-stops after limits, and includes a sample log entry format. This is far beyond the bare minimum and gives the agent a clear picture of what to expect.

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 well-structured with clear sections (WORKFLOW, WHY A FILE) and is appropriately sized for the tool's complexity. Every sentence serves a purpose, and the key 'returns a file path' point is front-loaded. No wasted words.

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?

Without an output schema, the description fully explains the return value (file path), the file format, and the multi-step workflow. It also clarifies auto-stop behavior and resource limits. This is complete enough for an agent to use the tool confidently.

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%, so the baseline is 3. The description does not add meaning beyond the schema; it reiterates required parameters and caps that are already in the property descriptions. The example log line is a nice extra but doesn't change parameter semantics.

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 tool's verb and resource: 'Start tracing function calls on a module.' It also distinguishes itself by explaining the key behavioral nuance that it writes to a file rather than returning results directly, which separates it from siblings like stop_trace or get_logs.

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 a detailed workflow (call, wait, read file) and states that stop_trace is not needed. However, it does not explicitly compare this tool to specific alternatives like get_logs or xref_callers, so the 'when to use vs alternatives' is only implied rather than directly stated. The workflow and notes on required params offer clear context.

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/JediLuke/BeamScope-MCP'

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