Skip to main content
Glama

getFunctionCode

Read-only

Get the source code of a function. Requires functionName parameter in format 'username/functionName'.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "functionName": "<functionName>"
    },
    "name": "getFunctionCode"
  }
}

Input Schema

NameRequiredDescriptionDefault
functionNameYesThe function identifier in format 'username/functionName' (e.g., 'david/func1')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds no behavioral context beyond that — nothing about return format, size limits/truncation of large source files, or whether the code returned is deployed vs. draft.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with the purpose and no filler. The second sentence largely duplicates the schema's parameter description, costing a point of conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter read tool with full annotations and complete schema coverage, the definition is sufficient to invoke correctly. However, with no output schema present, it could have said what the return value looks like (raw source string vs. structured object), which is a real gap for a code-retrieval tool.

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 100% and the single parameter's format is fully documented in the schema. The description restates the same 'username/functionName' format without adding new meaning, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb and resource ('Get the source code of a function'), so an agent immediately knows the operation. It does not differentiate from close siblings such as getFunction, checkCode, or updateFunctionCode, leaving some ambiguity about what distinguishes source retrieval from metadata retrieval.

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?

Usage is only implied by the purpose statement — an agent must infer that this is the tool for reading source text rather than inspecting status or metadata. No explicit when-to-use, when-not-to-use, or alternative routing is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources