Skip to main content
Glama
aferreiraguido

javascript-mcp-server

inspect_function

Inspect any JavaScript/TypeScript function or method to retrieve its signature, parameters, documentation, and source body.

Instructions

Inspects a function or method (class.method): signature, parameters, doc, body.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName or path of the loaded project
symbolYesFunction name or "Class.method"
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 of disclosing side effects and safety. It implies a read-only operation by using 'inspects' and lists the components examined, but it does not explicitly state non-mutating behavior, output format, or error cases. This is adequate for a simple inspection tool but lacks explicit safety confirmation.

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 sentence that front-loads the verb and resource, with no redundant language. It earns its place by listing the inspected attributes in a compact list.

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?

The description lists the four key aspects of a function that will be returned (signature, parameters, doc, body), which is sufficient for a focused inspection tool. There is no output schema, so the description's enumeration acts as the output contract. However, it does not mention the return format or how errors like 'symbol not found' are handled, leaving a minor gap.

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?

Both parameters are fully described in the schema with 100% coverage: 'name' refers to the loaded project and 'symbol' takes a function name or 'Class.method'. The tool description adds no additional semantics beyond restating the symbol format, so the schema already carries the burden.

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 identifies the tool's action (inspects) and resource (a function or method), distinguishing it from sibling tools like list_functions or inspect_class. It also specifies the exact aspects inspected: signature, parameters, doc, body.

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 when a user needs details about a specific function or method, but does not explicitly state when to prefer this over alternatives like inspect_class or list_functions. No exclusions or alternative tools are mentioned, leaving the usage context to be inferred from the tool name and description.

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/aferreiraguido/javascript-mcp-server'

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