Skip to main content
Glama

NEARpedia

check_code

Check NEAR code before you ship it: finds the lines that import, depend on, call or configure something removed, deprecated, changed or superseded in NEAR (archived SDKs, removed protocol actions, deprecated RPC methods, retired endpoints), and dependencies that are yanked or whole breaking lines behind, each with the replacement and the source and date of the claim. Accepts one file: JavaScript/TypeScript, Rust, Cargo.toml, package.json or a JSON config. Use it on code written from memory, or when reviewing NEAR code. NEAR only. For one name rather than a file use check_deprecation.

Input Schema

NameRequiredDescriptionDefault
codeYesThe file contents, up to 100000 characters.
filenameNoThe file name, e.g. "contract.ts", "Cargo.toml", "package.json". Picks the language.
languageNoOverrides the language detected from the file name or content.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses that results include the replacement plus the source and date of the claim, that only one file is analyzed, and which file types are accepted. It does not state whether the tool is read-only/network-backed or what happens on unsupported or empty input, but for an obviously non-mutating analysis tool this is a minor gap.

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?

Purpose is front-loaded and the progression from what it finds, to accepted input, to when to use it, to the sibling alternative is logical. The opening sentence is overloaded with parallel lists ('removed, deprecated, changed or superseded' plus a parenthetical enumeration) that could be tightened, but no sentence is truly wasted.

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

Completeness5/5

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

There is no output schema, and the description compensates by explaining that each finding comes with its replacement and the source and date of the claim. Combined with the input constraints, the NEAR-only scope and the routing to check_deprecation, an agent has everything needed to call this correctly.

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 coverage is 100%, so filename, language and code are already documented, including that filename picks the language. The description echoes the accepted file types and the single-file constraint, adding modest reinforcement but no syntax or format detail beyond the schema. Baseline 3 is appropriate.

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?

States a concrete verb (check/find) and a precisely scoped resource: lines that import, depend on, call or configure entities removed, deprecated, changed or superseded in NEAR, plus yanked dependencies and breaking lines. The parenthetical enumerates the exact categories (archived SDKs, removed protocol actions, deprecated RPC methods, retired endpoints), and it explicitly contrasts itself with the sibling check_deprecation, so an agent can distinguish the two without opening either schema.

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?

Gives explicit when-to-use conditions ('on code written from memory, or when reviewing NEAR code'), an explicit scope exclusion ('NEAR only'), an input constraint (one file), and a named alternative with the discriminator ('For one name rather than a file use check_deprecation'). Nothing about selection is left to inference.

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.