Skip to main content
Glama

validate_micropython_code

Validates MicroPython code before TI-Nspire CX II deployment, checking syntax, restricted modules, screen coordinates, RGB values, and RAM footprint to catch errors early.

Instructions

Herramienta de depuración preventiva de código MicroPython antes del envío a la TI-Nspire CX II. Verifica sintaxis AST, módulos restringidos, coordenadas fuera de pantalla (320x240), rangos de color RGB (0-255) y huella de RAM.

:param python_code: Código Python a validar.

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

Input Schema

NameRequiredDescriptionDefault
python_codeYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does add real behavioral substance: the specific validation categories and hard thresholds (320x240 screen, 0-255 RGB) tell the agent what this tool will flag. It never states whether the call is side-effect free, whether it blocks the upload, or what a failure looks like — though the existence of an output schema covers the return shape.

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 front-loaded sentences covering purpose then the check list, followed by a param note. Efficient overall, though the ':param' line duplicates schema information and adds no meaning.

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 single-parameter, read-only-style validation tool with an output schema, the description supplies enough to call it correctly: what it validates and when to use it. The remaining gap is failure semantics and whether RAM-footprint limits are configurable, which the output schema may already surface.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is one parameter with 0% schema description coverage, so the description must compensate and it effectively does not: ':param python_code: Código Python a validar' merely restates the schema title 'Python Code'. No guidance on whether a full script, imports, or a fragment is expected, nor any size or encoding constraints.

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 and resource — preventive validation of MicroPython code — and enumerates the exact checks performed (AST syntax, restricted modules, on-screen coordinates 320x240, RGB 0-255, RAM footprint). It implicitly positions itself before upload/creation siblings via 'antes del envío a la TI-Nspire CX II', but never names an alternative tool, so differentiation is inferred rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear usage context: run this on code prior to sending it to the calculator, which tells an agent where in the workflow it belongs. It stops short of explicit when-not-to-use conditions or naming a sibling (e.g. create_python_tns_document) that already performs validation or would be the next step.

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