Skip to main content
Glama

add_curve_key

Destructive

Add or update a keyframe at a given time and value on a curve channel, set interpolation, and save the asset. Existing keys at that time are replaced.

Instructions

Add or update a keyframe (time, value) on one channel of a CurveFloat, CurveVector or CurveLinearColor asset, set its interpolation and save the asset; a key already at that time is replaced. Returns the read-back time, value, interp and key_count. Inverse: remove_curve_key; list keys with get_curve_keys.

Returns: { curve_path, curve_class, channel, num_channels, time, value, interp, key_added, key_count, saved }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeYesKey time on the X axis of the curve, in the units the curve uses (often seconds); an existing key at this time is replaced
valueYesKey value (Y axis) stored at that time on the chosen channel, as a float
interpNoKey interpolation mode (constant|cubic|linear, default linear); any other value silently falls back to linear
channelNoCurve channel index, default 0: 0 for CurveFloat, 0-2 (X, Y, Z) for CurveVector, 0-3 (R, G, B, A) for CurveLinearColor; out of range is an error
curve_pathYesFull asset path of the curve

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.2.0
    • changedInput schema / properties / channel / description
      Previous value: -"Curve channel index (defaults to 0)"New value: +"Curve channel index, default 0: 0 for CurveFloat, 0-2 (X, Y, Z) for CurveVector, 0-3 (R, G, B, A) for CurveLinearColor; out of range is an error"
    • changedInput schema / properties / interp / description
      Previous value: -"Key interpolation mode (constant|cubic|linear, default linear)"New value: +"Key interpolation mode (constant|cubic|linear, default linear); any other value silently falls back to linear"
    • changedInput schema / properties / time / description
      Previous value: -"Key time"New value: +"Key time on the X axis of the curve, in the units the curve uses (often seconds); an existing key at this time is replaced"
    • changedInput schema / properties / value / description
      Previous value: -"Key value"New value: +"Key value (Y axis) stored at that time on the chosen channel, as a float"
  2. First observedv1.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, but the description adds important behavioral detail beyond that: an existing key at the same time is replaced, the interpolation is set, and the asset is saved. It also describes the read-back return fields, which helps the agent understand the post-mutation state.

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?

The description is front-loaded with the core action and effect, and the tool/alternative routing is compact. It is slightly redundant: the first paragraph already mentions the returned fields (time, value, interp, key_count) before the explicit return object repeats them.

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?

There is no output schema, so the description usefully supplies the full return shape including key_added, key_count, and saved. Combined with annotations and the complete input schema, an agent has enough information to invoke the tool correctly and understand the result.

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 the schema already documents time, value, interp, channel, and curve_path in detail. The description adds little parameter-specific meaning beyond restating that the keyframe has a time and value and that interpolation is set. A baseline 3 is appropriate when the schema carries the parameter semantics.

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 states a specific verb (add or update a keyframe), the resource (one channel of a CurveFloat, CurveVector, or CurveLinearColor asset), and the full effect (set interpolation and save the asset). It clearly distinguishes the tool from siblings by naming its inverse (remove_curve_key) and list counterpart (get_curve_keys).

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?

It explicitly names the inverse operation (remove_curve_key) and the related listing tool (get_curve_keys), giving an agent clear alternatives for related tasks. However, it does not state when-not to use this tool or contrast it with other curve-modifying tools such as add_curve_table_key or set_anim_curve_keys.

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

Deploy Server

Other Tools