Skip to main content
Glama

get_signature

Extract function signatures from code files to document interfaces, verify parameters, or support refactoring tasks in Python, JavaScript, TypeScript, C, and C++.

Instructions

Return the signature of a function (everything before its body) as plain text. Read-only. Works for Python, JS, TS, C, and C++.

Use this when: You need a function's exact signature for documentation, refactoring, or to verify the interface before editing. Don't use this when: You need to see the whole function body -> read the file directly.

Example: target="LRUCache.get"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
targetYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key traits: it's 'Read-only' (indicating non-destructive behavior), specifies language support, and clarifies the scope (signature only, not the body). However, it lacks details on error handling, rate limits, or authentication needs, which would be useful for a tool interacting with files.

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 well-structured and front-loaded, with the core purpose stated first, followed by behavioral notes, usage guidelines, and an example. Every sentence adds value without redundancy, and the bullet-like formatting for guidelines enhances readability, making it efficient and easy to parse.

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?

Given the tool's moderate complexity (2 parameters, no annotations, but with an output schema), the description is largely complete. It covers purpose, behavior, and usage well. However, it lacks details on parameter semantics and error cases, which are partially mitigated by the output schema handling return values but still leave gaps for effective tool invocation.

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 description coverage is 0%, so the schema provides no parameter details. The description adds minimal semantics: it implies 'target' identifies a function (e.g., 'LRUCache.get') but doesn't explain 'file_path' or the exact format of 'target'. While it offers an example, this only partially compensates for the low coverage, leaving some ambiguity in 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 the tool's purpose with specific verbs ('Return the signature') and resources ('function'), distinguishing it from siblings like 'read_symbol' or 'replace_signature' by focusing solely on signature extraction. It explicitly mentions the output format ('plain text') and supported languages ('Python, JS, TS, C, and C++'), making it highly specific and differentiated.

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?

The description provides explicit guidance with 'Use this when' and 'Don't use this when' sections, naming specific scenarios (documentation, refactoring, interface verification) and alternatives ('read the file directly'). This clearly defines when to use this tool versus other options, including sibling tools that handle full function bodies or modifications.

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/kambleakash0/agent-skills'

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