Skip to main content
Glama

get_function_context

Fetch function signature, parameters, callers, callees, dependencies, and docstring to understand code behavior and assess change impact.

Instructions

Get comprehensive context for a function: signature, parameters, callers, callees, dependencies, and docstring.

Supports 'ClassName.method_name' syntax (e.g., 'ToolExecutor.execute'). For two top-level functions sharing the same name in different files (where ClassName.method doesn't apply), pass file_path to pick one. If multiple matches remain, returns a disambiguation list.

Use this when you need to understand what a function does, who calls it, and what its blast radius is for modifications.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
function_nameYesName of the function to look up.
detailNoLevel of detail: "signatures", "summary" (default), or "full".summary
include_hintsNoIf True, append navigation suggestions.
file_pathNoOptional path filter to disambiguate same-named top-level functions in different files. Matched by substring against each candidate's filepath, so a partial path like ``"api/agents.py"`` is enough.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations are provided, so the description carries the full burden. It mentions that if multiple matches occur, a disambiguation list is returned, and that 'file_path' uses substring matching. However, it does not disclose whether the tool is read-only, any required permissions, or performance characteristics. These gaps are notable for a tool operating on a codebase.

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 concise and well-structured. It front-loads the main purpose in the first sentence, then covers specialized syntax, disambiguation, and usage context in subsequent sentences. Every sentence adds value with no redundancy or unnecessary detail.

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 presence of an output schema (not shown but indicated) and 100% parameter description coverage, the description is complete for its complexity. It explains purpose, usage, and edge cases (multiple matches, file_path disambiguation) without needing to cover return values since the output schema handles that. The tool's domain (code context) is well-served.

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?

Schema description coverage is 100%, so baseline is 3. The description adds meaningful context beyond the schema: it explains the 'ClassName.method_name' syntax for function_name and the substring matching behavior for file_path. This enhances the agent's understanding of effective parameter usage.

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 that the tool retrieves comprehensive context for a function, including signature, parameters, callers, callees, dependencies, and docstring. It distinguishes itself from siblings by emphasizing breadth ('comprehensive') and blast radius, which is unique among sibling tools like get_call_graph or get_class_context.

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 explicitly says 'Use this when you need to understand what a function does, who calls it, and what its blast radius is for modifications.' This is clear guidance. However, it does not explicitly state when not to use it or how it differs from specific siblings, which would strengthen the score.

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/bilal07karadeniz/Grafyx'

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