Skip to main content
Glama
affinity-mcp

affinity-mcp

by StevenJPx2

affinity_execute_script

Destructive

Runs JavaScript inside Affinity to modify open design documents and access capabilities permitted by Affinity settings.

Instructions

Execute JavaScript in Affinity. This can modify documents and access capabilities allowed by Affinity settings.

Input Schema

NameRequiredDescriptionDefault
scriptYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false, so the safety profile is largely covered. The description adds real value with 'This can modify documents and access capabilities allowed by Affinity settings,' which discloses mutation scope and permission gating. It says nothing about error behavior, sandboxing, or whether repeated execution is safe, which the non-idempotent hint already implies but leaves unexplored.

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?

Two short sentences, front-loaded with the action and followed by the risk note. No filler, though there is room for a sentence about the script contract without bloat.

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?

For an arbitrary-code-execution tool with one undocumented parameter, no output schema, and no stated return behavior, the description is thin. It omits what the script receives, what it returns to the caller, and how to discover the available API, all of which an agent needs before invoking it safely.

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

Parameters2/5

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

The single parameter has 0% schema description coverage and the description adds no meaning: it doesn't say whether the script should be a function body, an expression, or an IIFE; whether it may be async; or what variable names are in scope. With coverage this low, the description needed to compensate and does not.

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?

States a specific verb and resource: 'Execute JavaScript in Affinity.' It is the only execution-capable tool among the siblings, so the resource is unambiguous. It doesn't define the scope of what 'JavaScript in Affinity' means (API surface, context), which keeps it from a 5.

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?

There is no when-to-use guidance and no mention of alternatives or prerequisites. Siblings like affinity_list_sdk_documentation, affinity_read_sdk_documentation_topic, and affinity_add_sdk_hint exist precisely to support script writing, but the description never routes the agent to them before executing.

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