Skip to main content
Glama

script_add

Install a .lua or .js mpv user script into the config scripts directory, enable it, and load it into the running player immediately.

Instructions

Install a .lua or .js mpv user script into the config scripts directory, enable it, and load it into the running player immediately.

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>"
    },
    "name": "script_add"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the .lua or .js script file to install

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does well by disclosing a three-part effect: file copied into the config directory, enabled, and loaded into the running player immediately with no restart. It omits edge behaviors such as overwriting an already-installed script or what happens if the file is invalid, which keeps it from a 5.

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?

One sentence, front-loaded with the action and resource, followed immediately by the three effects. Nothing is padded or repeated from the schema.

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 one-parameter tool with no output schema and no annotations, the description covers both the input contract and the resulting side effects. The main remaining gap is failure/overwrite behavior, which an agent would want before installing over an existing script.

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?

The single parameter is fully documented in the schema, and the description adds a real constraint beyond it by limiting accepted files to .lua or .js. It does not say whether path must be absolute or relative to the config directory.

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?

States a specific verb (install) plus the resource (an mpv .lua or .js user script) and the exact destination (the config scripts directory). The name-plus-description pair clearly separates it from siblings like script_remove, script_toggle, and script_list, which handle other lifecycle stages.

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?

Usage is implied rather than stated: installing is the natural entry point before script_toggle/script_remove, and the '.lua or .js' constraint signals valid inputs. There is no explicit when-to-use or when-not-to-use guidance, and no sibling is named as an alternative for related operations.

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

Deploy Server

Other Tools