Skip to main content
Glama

find_function

Read-onlyIdempotent

Locate function and method definitions by name to get exact file and line references for code navigation and change impact analysis.

Instructions

Find function and method definitions by name, with file and line.

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": {
      "name": "<name>"
    },
    "name": "find_function"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNoList everything instead of stopping at 200 items.
nameYesFunction or method name; literal text with optional .* wildcards.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A3.6/5.0
Behavior3/5

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

The annotations already establish that this is a read-only, idempotent, non-destructive, closed-world lookup, so the description need not repeat safety details. It adds useful return context by saying results include file and line, but it does not disclose the 200-item stopping behavior mentioned in the schema.

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 definition is a single well-formed sentence with no wasted words, and the core purpose and return context are front-loaded. Its terseness is efficient rather than confusing.

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?

For a simple two-parameter lookup with full schema coverage and annotations covering safety, this is largely complete: it says what is searched and what is returned. The main remaining gap is that broader usage guidance is omitted, but the schema handles truncation and wildcard details.

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%, so both parameters are already fully documented in the input schema. The description reinforces that lookup is by name but does not add wildcard syntax, case sensitivity, or other semantic details beyond the schema baseline.

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?

The description states a specific verb and resource: finding function and method definitions by name, with file and line included. It implicitly distinguishes definitions from call-related siblings, but it does not explicitly name or contrast alternatives such as find_calls or find_callers.

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 implied: an agent can infer this is for locating a definition when it already has a function or method name. However, there is no explicit when-to-use guidance, no exclusions, and no routing to sibling tools for calls, callers, or related analyses.

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