Skip to main content
Glama

cos_graph_context

Read-onlyIdempotent

Retrieve callers, callees, siblings, and referenced docs around a symbol. Configure direction, depth, and options for source content, evidence, and ancestry.

Instructions

Return callers + callees + siblings + referenced docs around a symbol.

Args: uid_or_name: Node uid or fuzzy label. Uid scheme: code:file:<path> | code:function:<path>::<name> | code:class:<path>::<name> | code:module:<dotted> | doc:file:<path> | doc:heading:<path>#<slug>:<level> | folder:<path>. Raw repo paths (core/foo.py) are auto-resolved to code:file: / doc:file: / folder:; if all variants miss, a fuzzy label match is tried. Run cos_graph_query first to discover candidates. direction: "in" | "out" | "both". depth: BFS depth (default 1). include_content: When True, each returned node gains a content field with source text read from file_path:start_line..end_line (capped at 2000 chars, with truncated: bool). Silently skipped when the file is missing or the node has no file_path. (B21) include_evidence: JOIN evidence rows (costs ~2× tokens). include_spine: S3 — pulls the CONTAINS-ancestor chain (file → folder → …) so the UI can render breadcrumbs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNo
directionNoboth
uid_or_nameYes
include_spineNo
include_contentNo
include_evidenceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, so safety is covered. The description adds significant behavioral context beyond that: include_content reads source text capped at 2000 chars with a truncation flag, is silently skipped if file missing; include_evidence costs ~2× tokens; include_spine pulls the CONTAINS-ancestor chain. These details are not inferable from annotations and help the agent anticipate side effects and costs.

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 front-loaded with a one-sentence purpose, then organizes parameters in a clear Args block. The formatting is tight, using code spans and concise explanations. No fluff; every sentence adds technical detail. The length is justified by the number of parameters and the complexity of the UID scheme.

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 the tool's complexity (6 parameters, UID resolution, optional content/evidence/spine) and the presence of an output schema, the description is highly complete. It covers param behavior, edge cases (missing file, fuzzy match), cost implications, and workflow (run cos_graph_query first). The output schema obviates the need to describe return structure, so the description correctly focuses on inputs and side behaviors.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden. It compensates thoroughly: uid_or_name is explained with a complete UID scheme, examples, auto-resolution rules, and fallback; direction lists values; depth explains BFS; include_content and include_evidence describe concrete effects; include_spine explains what it pulls. Every parameter is semantically enriched beyond the raw schema.

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 opens with a specific, action-oriented statement: 'Return callers + callees + siblings + referenced docs around a symbol.' This clearly identifies the resource (a symbol in the code graph) and the scope (callers, callees, siblings, referenced docs), distinguishing it from sibling tools like cos_graph_query (which discovers candidates) and cos_graph_references (likely narrower).

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 gives explicit workflow guidance: 'Run cos_graph_query first to discover candidates.' This tells the agent when to use this tool relative to a direct alternative. It also clarifies the auto-resolution and fuzzy fallback behavior for uid_or_name. However, it does not explicitly contrast with other graph tools (e.g., cos_graph_trace, cos_graph_impact), so there is still some ambiguity about when to choose this over those.

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