Skip to main content
Glama

create_python_tns_document

Package Python source into a .tns document ready to transfer and run on TI-Nspire CX II, with built-in MicroPython validation before export.

Instructions

Empaqueta código Python en un archivo de documento .tns listo para transferir y ejecutar directamente en la TI-Nspire CX II. Incluye verificación preventiva de MicroPython.

:param filename: Nombre del archivo (ejemplo: 'solucionador.tns' o 'app') :param python_code: Código fuente en Python para la calculadora. :param output_directory: Carpeta de destino (por defecto el Escritorio del usuario).

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

Input Schema

NameRequiredDescriptionDefault
filenameYes
python_codeYes
output_directoryNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral load. It discloses one meaningful trait — a preventive MicroPython check is performed — but does not say what happens if that check fails, whether an existing file at the target path is overwritten, or whether elevated filesystem permissions are needed.

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 sentences of purpose followed by a compact param block; the core action and target device are front-loaded and nothing is redundant. The param lines are somewhat terse but each earns its place.

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?

An output schema exists, so return values need not be explained, and all three parameters are documented. The remaining gap for a filesystem-writing tool with zero annotations is failure/overwrite semantics, which the description leaves unaddressed.

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

Parameters4/5

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

Schema description coverage is 0%, so the description is the only source of parameter meaning, and it compensates well: filename with a concrete example ('solucionador.tns' or 'app'), python_code as calculator source, and output_directory defaulting to the user's Desktop. Types and validation rules are still absent.

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 output ('Empaqueta código Python en un archivo de documento .tns') plus the target device (TI-Nspire CX II), which is far more than a restatement of the name. It implicitly separates itself from Lua/ndless packaging siblings through the explicit 'Python' scope, though it never names an alternative directly.

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?

The description conveys the usage context ('listo para transferir y ejecutar directamente en la TI-Nspire CX II'), which implies when the tool applies, and the MicroPython note hints at a validation step. It gives no explicit when-not guidance, no mention of when to call validate_micropython_code first, and no routing among the related create_*/convert_* siblings.

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