Skip to main content
Glama

Add dynamic attribute

cavalry_add_dynamic_attribute

Add a dynamic attribute to supported layers, such as JavaScript layers, by specifying the layer ID and attribute type. Returns the new array count; list attributes to find the new attribute path.

Instructions

Add a dynamic attribute to layers that support them (e.g. JavaScript layers). Returns the new array count; use cavalry_list_attributes to find the new attribute path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesAttribute type, e.g. "double", "int", "bool", "string", "double2", "color".
attrIdNoDynamic array attribute. Defaults to "array".
layerIdYesCavalry layer id, e.g. "basicShape#1". Use cavalry_list_layers to find ids.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=false, idempotentHint=false, destructiveHint=false, openWorldHint=false). The description adds genuinely new context beyond them: that support is layer-dependent, that it returns the new array count, and how to discover the resulting attribute path — all useful for a non-idempotent mutation. It doesn't warn about repeated calls duplicating attributes, but the non-idempotent hint covers that risk.

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?

Two tightly written sentences with no filler; the support constraint and return value come first and the follow-up tool pointer last. Every clause carries actionable information.

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?

With no output schema, the description usefully discloses the return value (new array count) and the discovery path for the created attribute, plus the layer-support caveat. For a simple 3-parameter mutation this is close to sufficient, though a note on failure modes for unsupported layers would round it out.

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?

Schema description coverage is 100%, so all three parameters (type, attrId, layerId) are already documented in the schema, including the default for attrId and an example layer id. The description adds no parameter-level detail beyond that, so the baseline of 3 applies.

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+resource ('Add a dynamic attribute') plus a real scope constraint ('layers that support them, e.g. JavaScript layers'), which meaningfully narrows it against siblings like cavalry_set_attributes or cavalry_create_layer. It stops short of explicitly contrasting with those siblings, so it doesn't quite reach 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 Guidelines4/5

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

Gives a clear condition for use (only layers supporting dynamic attributes) and names a follow-up tool (cavalry_list_attributes) to locate the new attribute path. There's no explicit when-not-to-use or direct alternative comparison against cavalry_set_attributes, so it's clear context without exclusions.

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