Skip to main content
Glama

ctx_dependencies

Return a file's outbound import dependencies as JSON. Use to identify what a file imports before refactoring.

Instructions

Return the outbound import edges of a file as JSON: [{target, imported_symbol}] — the project files/modules it imports and, where known, the symbol imported. Use to see what a file depends on before refactoring it. path is project-relative or absolute (traversal rejected). For the reverse direction (who imports this) use ctx_dependents. Requires the project to be indexed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesProject-relative or absolute file path. Paths outside the project root are rejected. Required.
Behavior4/5

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

No annotations are provided, so the description carries the disclosure burden. It covers key behavioral traits: returns JSON with a specific shape, rejects path traversal, and requires an indexed project. It reasonably implies a read-only operation through 'Return' and 'Use to see'.

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?

Three sentences each carry distinct information: output shape and purpose, parameter constraint, and alternative tool plus prerequisite. No filler, and the most important information is front-loaded.

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?

For a single-parameter read-only query with no output schema, the description fully equips an agent: return format, field names, path semantics, use case, sibling alternative, and prerequisite. Nothing essential is missing.

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%: the path parameter is already fully described (project-relative or absolute, outside root rejected, required). The description repeats this and adds 'traversal rejected', which is marginal value beyond the schema, so the baseline of 3 is appropriate.

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?

Description starts with a specific verb and resource: 'Return the outbound import edges of a file as JSON'. It names the output shape and explicitly distinguishes itself from ctx_dependents ('For the reverse direction...use ctx_dependents'), so an agent can select it correctly.

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

Usage Guidelines5/5

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

States when to use it ('before refactoring it'), names the reverse-direction alternative explicitly, and gives a prerequisite ('Requires the project to be indexed'). This is clear, actionable usage guidance.

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/halloffame12/CTX'

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