Skip to main content
Glama

colab_notebook_to_script

Convert a Colab notebook into a .py script: markdown becomes comments, and ! or % lines are commented out. Set out_path to write the file; otherwise get the text.

Instructions

Convert a notebook to a .py script (markdown becomes comments; lines starting with ! or % are commented out). With out_path, writes the file; otherwise returns the text. Handy before colab_run.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
out_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It usefully discloses the transformation semantics (markdown to comments, !/% lines commented out) and the two output modes (write file vs return text). However, it omits side-effect details such as overwrite behavior when out_path exists and error handling for invalid notebooks, leaving meaningful gaps for an unannotated mutation-capable tool.

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?

Three short clauses, front-loaded with the core purpose, followed by transformation detail and the mode switch. Every sentence earns its place with no filler.

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?

An output schema exists, so return values needn't be described, and the description correctly notes the text-return case. Combined with the transformation rules, it is largely sufficient for correct invocation; only edge cases like overwriting an existing out_path are unaddressed.

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 0%, so the description must compensate. It does explain out_path clearly ('writes the file; otherwise returns the text'), which resolves the genuine ambiguity of the optional parameter. The required path parameter receives no explicit semantic description, so compensation is partial.

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: 'Convert a notebook to a .py script', with immediate detail on the transformation rules. It is clearly distinguishable from read/list/navigation siblings. It stops short of an explicit sibling contrast, which is only a minor gap given no other sibling performs conversion.

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?

'Handy before colab_run' gives concrete usage context, and the out_path conditional tells the agent which mode to pick. There is no explicit when-not-to-use guidance or mention of alternatives, so it falls short of a 5.

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