Skip to main content
Glama

suggest_symbol

Find nearest valid export symbol names in an npm package when a symbol is misspelled or unknown, ranked by Levenshtein distance for correction.

Instructions

Find nearest valid export symbol names in an npm package using Levenshtein distance ranking.

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": {
      "package": "<package>",
      "symbol": "<symbol>"
    },
    "name": "suggest_symbol"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNomaximum number of ranked suggestions
symbolYesmisspelled or alleged symbol name
packageYesnpm package name
versionNopackage semver or tag

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and only discloses the ranking algorithm. It does not say whether the package must be installed or is fetched remotely, what happens when no close match exists (empty list vs error), or whether suggestions include the export kind.

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?

A single front-loaded sentence with no filler; the core action and its mechanism are stated immediately. Nothing needs trimming and nothing is buried.

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?

No output schema exists, so the description should clarify the return shape — a ranked suggestion list is only hinted at by 'ranking'. It also omits the failure mode and the sibling relationship, leaving gaps for an agent deciding between suggest and verify.

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 all four parameters (package, symbol, version, limit) are already documented with defaults. The description adds no format or constraint detail beyond the schema, so the baseline 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?

States a specific verb ('Find'), a specific resource ('nearest valid export symbol names in an npm package'), and the ranking mechanism (Levenshtein distance), which distinguishes a suggestion tool from a pure lookup. It stops short of explicitly contrasting with the sibling verify_symbol, so an agent must infer the suggest-vs-verify split.

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: 'nearest valid' suggests correcting a misspelling, but the description never says when to call this instead of verify_symbol, nor what to do with the results. The typo-correction scenario lives in the schema ('misspelled or alleged symbol name') rather than the description.

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