Skip to main content
Glama

Extract a scenario into a Lua project

cmo_extract_project
Destructive

Unpack a .scen scenario file into an editable cmo-lua project with a JSON manifest and one Lua script per event action, ready for editing and recompiling.

Instructions

Unpack a .scen file into a cmo-lua project: cmo-project.json plus one scripts/*.lua file per event action. Edit those files, then cmo_compile_loader. Refuses to replace an existing project unless overwrite is true.

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": {
      "path": "<path>",
      "directory": "<directory>"
    },
    "name": "cmo_extract_project"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesScenario file to read
directoryYesFolder to create the project in
overwriteNoReplace cmo-project.json and extracted scripts if they already exist

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, but the description adds real value by explaining the guard: replacement is refused unless overwrite is true. That converts an abstract destructive flag into a concrete precondition and failure mode. What happens to the source .scen file and whether the target directory must be empty remain undisclosed.

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 sentences, front-loaded with the input-to-artifact mapping, then workflow, then the safety constraint. No filler and nothing buried.

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 3-parameter extraction tool with no output schema, it covers input, produced files, next step, and the overwrite precondition well enough to invoke correctly. Minor gaps are the fate of the source scenario and any requirement on the target directory's prior contents.

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 coverage is 100%, so baseline is 3, but the description adds failure semantics the schema cannot express: the overwrite flag governs a refusal-to-replace behavior rather than just swapping files. The linkage between a false default and an error path is genuinely useful.

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?

Names a specific verb (unpack/extract) and the exact artifacts produced: cmo-project.json plus one scripts/*.lua file per event action. That artifact-level detail distinguishes it from read-only siblings like cmo_read_scenario without the agent needing to open another schema.

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 an explicit follow-up workflow ('Edit those files, then cmo_compile_loader'), which tells the agent where this tool sits in the pipeline. It stops short of an explicit exclusion (e.g., 'use cmo_read_scenario if you only want to inspect'), so it is clear context rather than full when/when-not guidance.

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