Skip to main content
Glama

app_run_hat

Idempotent

Trigger a hat block live in the mBlock app to start event-driven scripts instantly.

Instructions

LIVE: run a hat block in the app (app.workspace.runBlocks).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opcodeYesHat opcode, e.g. event_whenflagclicked

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false (so it mutates), idempotentHint=true, and destructiveHint=false. The description adds the 'LIVE' qualifier and the internal method, which gives a hint of real-time execution, but it does not explain side effects or what 'run a hat block' implies (e.g., triggers the associated script). With annotations covering safety, a 3 is fair.

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 a single short sentence with no filler. It front-loads the key action and includes the method name. Very efficient.

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

Completeness3/5

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

For a simple one-parameter tool, the description states the core function, but it lacks guidance on when to use it versus similar tools and does not mention any required preconditions. Given the large sibling list, more differentiation would be helpful, so a 3 is suitable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema covers 100% of the parameters with a description and example for 'opcode'. The tool description adds no additional semantics for the parameter, so it relies entirely on the schema. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('run') and resource ('hat block'), and names the underlying API method (app.workspace.runBlocks). It is clear enough to identify the action, but does not explicitly differentiate from sibling tools like app_put_and_run or add_script, so it lacks a distinguishing edge.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., app must be open, a hat block must exist) nor contrast with tools that run full scripts or add blocks. An agent would have to infer usage from the name alone.

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