Skip to main content
Glama

Load Invention

load_invention
Read-only

load_invention opens the in-chat player with a piece: it plays in the user's browser after they tap Play, with a reduced feature set (a preview), and may drop out. Use it only when no local Fyug tools are present; when they are, load the piece with them instead. Pass exactly one of json (a complete invention document as a serialized JSON string of at most 64 KiB) or ref (an exact ref from list_examples, which the player fetches itself), and optionally controls for the person to play (at most 16; one the piece lacks fails the call, naming it). A document gets check_invention's check first and fails with the same error; it also fails, naming what it used, when it needs something the browser lacks (a bundled sample its engine does not carry, or a module type it does not build). Succeeds with {playable, version, module_count, connection_count, controls}, plus not_run naming each script or agent module, which the player builds but does not run. While the player is open it offers tools that act on the piece it holds (list_controls, get_control, set_control, set_controls, apply_edits, get_invention, pause_invention, resume_invention, get_notes, which lists the notes it will play, and get_meters); it sends the levels at load and the controls the person changes (list_changed_controls lists them): a value the person changed is theirs, so do not set it back, and carry it into any new document. Nothing is stored.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "load_invention"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoExact ref of a bundled example, copied from list_examples.
jsonNoComplete invention JSON string (with modules, connections, etc.), at most 64 KiB.
controlsNoControls the player shows the person, at most 16, each a module id and a control key (describe_module lists a module's controls): each drawn as the local control panel draws it (a knob, slider or stepper for a number, a toggle for a switch, a segmented control or menu for a choice) and grouped by module.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / $defs / Target
      Added value: +{
      +  "description": "A control `load_invention` lists to show.",
      +  "properties": {
      +    "key": {
      +      "description": "Control key, as describe_module or list_controls names it.",
      +      "type": "string"
      +    },
      +    "module_id": {
      +      "description": "Module instance id, as the document names it.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "module_id",
      +    "key"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / controls
      Added value: +{
      +  "default": null,
      +  "description": "Controls the player shows the person, at most 16, each a module id and a control key (describe_module lists a module's controls): each drawn as the local control panel draws it (a knob, slider or stepper for a number, a toggle for a switch, a segmented control or menu for a choice) and grouped by module.",
      +  "items": {
      +    "$ref": "#/$defs/Target"
      +  },
      +  "type": [
      +    "array",
      +    "null"
      +  ]
      +}
  2. Added

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, it discloses that playback is a reduced preview and may drop out, that documents are validated first, that certain browser limitations fail the call, what the success shape contains, what not_run means, and that nothing is stored. It also warns that user-changed control values must not be reset and should carry into new documents.

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?

The description is dense but front-loaded and every sentence carries operational information. Despite its length, the content is appropriate for a complex tool with many behavioral rules, and there is no evident filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The definition covers the full lifecycle: usage conditions, input rules, validation and error behavior, success output, companion tools while the player is open, control ownership, and storage semantics. With no output schema, it supplies the return shape and meaning that would otherwise be missing.

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 the baseline is 3. The description adds useful constraints beyond the schema: exactly one of json or ref must be passed, json has a 64 KiB limit, ref must come from list_examples, and controls may have at most 16 entries.

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?

The description states a specific action and resource: it opens an in-chat player with an invention piece and plays it in the browser. It clearly distinguishes itself from local Fyug tools and names related tools such as check_invention and list_examples, so an agent can identify its role immediately.

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?

It gives explicit when-to-use guidance: only when no local Fyug tools are present, otherwise load with them instead. It also specifies the exactly-one-of json/ref rule, the controls limit, and when to use the player's derived tools.

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