Skip to main content
Glama

get_semantic_context

Retrieves file content and its local dependency tree to provide rich code context for analysis. Optionally outlines function signatures to reduce token usage.

Instructions

Returns the content of a file along with its local dependency tree, providing rich context for understanding the code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the file to analyze (relative to project root).
depthNoHow many import hops to follow. Default: config value.
outline_onlyNoReturn function/class/interface signatures without implementation bodies. Reduces tokens by 70–90%. Default: false.
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. While it states the core function (return content and dependency tree), it does not mention potential performance impacts, required permissions, file system access, or any side effects. For a tool that may perform heavy analysis (dependency traversal), 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 a single concise sentence with a front-loaded verb ('Returns'). Every word is meaningful and there is no redundancy. It is efficiently structured.

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?

Without an output schema, the description should fully explain what is returned. 'Rich context' is vague; it does not specify the format of the dependency tree or whether it includes full file content. For a tool that returns complex data, this leaves significant ambiguity.

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 description adds minimal value beyond the schema. It does not explain the practical implications of the depth parameter or how outline_only reduces tokens. The baseline of 3 is appropriate as the description does not enhance parameter understanding.

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 returns file content and its local dependency tree, which is a specific verb+resource pairing. This distinguishes it from sibling tools like get_changed_files (returns list of changed files) and get_project_tree (returns directory structure). The purpose is unambiguous and well-defined.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for code understanding but does not explicitly state when to use this tool versus alternatives. There is no mention of when not to use it or which sibling tool to choose instead. The usage context is implied but not directly guided.

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/Eltortilla1/synapse-code-mcp'

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