Skip to main content
Glama

check_code

Read-onlyIdempotent

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.

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

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.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered. The description adds value beyond that by disclosing output content ('each with the replacement and the source and date of the claim'), which tells the agent results are evidence-backed rather than bare line matches, and it constrains input to a single file. It stops short of noting size limits or latency, but the essential behavior is disclosed.

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?

Front-loaded with the core action and its findings, then the input constraint, then usage triggers and the sibling routing. The long second clause is dense but every element (replacement, source, date) carries distinct meaning. Minor tightening possible in the enumeration of deprecated categories, but nothing is padding.

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?

No output schema exists, and the description compensates by explaining what each finding includes (replacement, source, date of claim). Combined with the read-only annotations and fully described three-parameter schema, an agent has enough to call this correctly. The only gap is the absence of any note on result volume or truncation for large files near the 100000-character limit.

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 the schema already documents code, filename and language, including examples and the language enum. The description's mention of accepted file types (JavaScript/TypeScript, Rust, Cargo.toml, package.json, JSON config) and 'accepts one file' largely restates what filename's own description says, and it never explains the language override. 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 specific verb and resource ('Check NEAR code'), then enumerates exactly what it detects: imports/calls/config of removed, deprecated, changed or superseded NEAR APIs, plus yanked or breaking dependencies. It explicitly distinguishes itself from the sibling check_deprecation ('For one name rather than a file use check_deprecation'), so an agent can route 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 positive triggers ('on code written from memory, or when reviewing NEAR code'), a hard scope boundary ('NEAR only'), and an explicit alternative with the condition that selects it ('For one name rather than a file use check_deprecation'). When-to-use, when-not-to-use, and the sibling routing rule are all present.

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