Skip to main content
Glama

cavalry_run_script

Execute custom JavaScript in Cavalry to handle animation tasks that specialized tools do not cover, using api, cavalry, and ui namespaces.

Instructions

Execute arbitrary JavaScript in Cavalry's JavaScript Editor. Use Cavalry's api, cavalry, and ui namespaces. This is the most flexible tool — use it when no specialized tool fits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesJavaScript code to execute in Cavalry
Behavior4/5

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

With no annotations, the description carries the burden. It discloses 'arbitrary JavaScript' and 'most flexible', indicating broad, potentially far-reaching behavior. It goes beyond a generic 'run script' statement by naming namespaces, but it does not mention side effects, permissions, or error/return behavior.

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 sentences, each earning its place: statement of action/resource, namespace guidance, and explicit fallback usage. No fluff, well front-loaded with the verb and resource.

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

Completeness2/5

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

This is a powerful arbitrary-code tool, but the description omits what the script returns, how errors are surfaced, or whether the script can mutate the scene. With no output schema, the description should clarify these behavioral outcomes, making the current description incomplete for safe and correct invocation.

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% with 'JavaScript code to execute in Cavalry', so baseline is 3. The description adds value by naming the available namespaces, which clarifies what the code parameter can reference, going beyond the schema's minimal description.

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 opens with 'Execute arbitrary JavaScript in Cavalry's JavaScript Editor' — a specific verb and resource. It clearly differentiates itself from siblings by calling itself 'the most flexible tool' and a fallback for when no specialized tool fits.

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 explicitly instructs 'use it when no specialized tool fits', giving a clear decision rule. It also provides usage guidance by naming the relevant namespaces ('api, cavalry, and ui'), which helps the agent utilize the tool correctly.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kacperchlebowicz/Cavalry-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server