Skip to main content
Glama

cos_graph_trace

Read-onlyIdempotent

Trace code execution forward from a given function UID, following call edges until terminal labels like return or exception, to reveal runtime flow and exit paths.

Instructions

Forward execution walk from entry_uid until terminals.

Args: entry_uid: Function/method uid to start from, e.g. code:function:core/foo.py::bar. Raw paths or names are auto-resolved (file → code:file: then entry-point heuristic). Run cos_graph_query first if unsure. terminals: Comma-separated edge labels that stop the walk. max_steps: Hard cap on emitted steps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entry_uidYes
max_stepsNo
terminalsNoreturn,exception
include_externalNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the safety profile is covered. The description adds behavioral context such as the auto-resolution of entry_uid (file → code:file: then entry-point heuristic), the meaning of terminal edge labels, and the max_steps cap. It does not contradict annotations, but omits details about include_external behavior.

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 a one-line summary followed by a focused Args list. It is concise, front-loaded, and provides necessary parameter details without redundancy.

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?

The tool is moderately complex with four parameters and an output schema. The description covers the required entry_uid and the key behavioral controls (terminals, max_steps) well, and defers to cos_graph_query for uid resolution. The missing include_external parameter and lack of output format discussion (though output schema exists) keep it from being fully complete.

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 schema has 0% description coverage, so the description's Args section is essential. It explains entry_uid with an example and resolution logic, defines terminals as edge labels, and describes max_steps. However, it omits the include_external parameter, leaving it undocumented in both schema and description.

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 states 'Forward execution walk from `entry_uid` until terminals', which clearly identifies the tool as a forward graph traversal from a given uid. It includes an example uid format and differentiates from sibling tools like cos_graph_query and cos_graph_path by focusing on execution tracing.

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?

It provides clear usage context: use when you need to trace execution forward from a known entry_uid. It advises running cos_graph_query first if unsure, which is an explicit prerequisite. However, it does not name alternative traversal tools or state when not to use this tool.

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/kouroshez/coding-os'

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