Skip to main content
Glama
Flisk App Builder

Flisk App Builder

Official

resource_run

Destructive

Runs a one-off command such as a seed script, migration, or status check in a specific resource's environment, returning exit code, stdout, and stderr; requires confirm=true for safety.

Instructions

Run a one-off command (a seed script, a migration, a status check) with the environment one resource has in the stack, and return its exit code, stdout and stderr (the last 64 KB of each; values from the project's .env files are masked). It runs any command, so it is refused unless confirm is true: ask the user first. A container resource must be running (start it with up); a local-process resource runs from its folder. No input is passed. Names come from resource_list. Set projectPath when the MCP server is not running from the project root.

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": {
      "resource": "<resource>",
      "command": "<command>"
    },
    "name": "resource_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
commandYesThe program and its arguments, for example ["node", "scripts/seed.js"]
confirmNoMust be true to run the command: it runs arbitrary code in the resource's environment
resourceYesName of the resource whose environment the command gets
projectPathNoAbsolute path to the Flisk project root; run this operation from that directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.4.69
    • changedInput schema / properties / command / description
      Previous value: -"The program and its arguments, for example [\"printenv\", \"DATABASE_URL\"]"New value: +"The program and its arguments, for example [\"node\", \"scripts/seed.js\"]"
    • addedInput schema / properties / confirm
      Added value: +{
      +  "description": "Must be true to run the command: it runs arbitrary code in the resource's environment",
      +  "type": "boolean"
      +}
  2. Addedv1.4.25

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructive/openWorld/not-readOnly, but the description adds substantial context: output is truncated to the last 64 KB of stdout and stderr, .env values are masked, no stdin is passed, and execution location differs between container and local-process resources. It also discloses the confirm gate as a hard refusal condition, which is exactly the behavioral detail an agent needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then constraints, then the two sibling pointers — no filler sentences. It is one dense paragraph, so the refusal rule and resource-state rule would scan faster as separate lines, but nothing is wasted.

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?

For a destructive, arbitrary-code execution tool with no output schema, the description covers return values (exit code, stdout, stderr), truncation and masking behavior, preconditions, and the confirmation requirement. An agent has everything needed to call it correctly or refuse.

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 still adds value by explaining that resource names come from `resource_list`, that confirm is a refusal gate rather than a preference, and that projectPath is only needed when the server isn't running from the project root. The example format for `command` is already in the schema, so the gain is modest but real.

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 and resource — run a one-off command inside a resource's stack environment — and concretizes it with examples (seed script, migration, status check). It also distinguishes itself from siblings by naming `up` for starting containers and `resource_list` for names.

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?

Explicitly says when to use it (one-off commands rather than long-lived processes), when it will fail (container resource not running — start it with `up`), the prerequisite confirmation workflow (must ask the user first because confirm must be true), and when to set projectPath. Alternatives are named rather than inferred.

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