Skip to main content
Glama

Set a value on a run

set_value

Keeps a named value on a run — a reading, a count, who or what the run is about — under key, which its steps and its name quote as {param:key}. Use it when the person tells you something the run should carry, or for a startsWith value said after the start. It is read the way a typed value is: "42" is a number, true or false a yes or no, a link a link, anything else words. An empty value removes it. The answer is the command's id and a status.

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": {
      "run": "<run>",
      "key": "<key>",
      "value": "<value>"
    },
    "name": "set_value"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesThe value's name.
runYesThe run's id.
valueYesWords, a number, or true or false. Empty to remove it.

Output Schema

NameRequiredDescriptionDefault
runNoThe run it started, planned or found, where there is one: what set_value, next_step and the rest take.
urlNoFor publish_routine, once the person has published it: routinerun.com/c/<code>, the address to share.
codeNoFor publish_routine, once published: the eight-character code, which publish_routine takes again to replace it.
statusYesWhat the phone did with it, in one word; the sentence beside it says what that means.
commandYesThe command's id, which command_status takes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / code
      Added value: +{
      +  "description": "For publish_routine, once published: the eight-character code, which publish_routine takes again to replace it.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / url
      Added value: +{
      +  "description": "For publish_routine, once the person has published it: routinerun.com/c/<code>, the address to share.",
      +  "type": "string"
      +}
  2. Changed3 schema fields changed
    • changedInput schema / properties / value / description
      Previous value: -"A text, a number or true/false."New value: +"Words, a number, or true or false. Empty to remove it."
    • changedInput schema / properties / value / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "boolean"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "command": {
      +      "description": "The command's id, which command_status takes.",
      +      "type": "string"
      +    },
      +    "run": {
      +      "description": "The run it started, planned or found, where there is one: what set_value, next_step and the rest take.",
      +      "type": "string"
      +    },
      +    "status": {
      +      "description": "What the phone did with it, in one word; the sentence beside it says what that means.",
      +      "enum": [
      +        "done",
      +        "saved",
      +        "proposed",
      +        "refused",
      +        "tooOld",
      +        "runHadMoved",
      +        "alreadyDone",
      +        "notFound",
      +        "asked",
      +        "alreadyGoing",
      +        "waiting",
      +        "daySet",
      +        "linked",
      +        "wrongKind"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "command",
      +    "status"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare that this is a non-read-only, non-destructive, local mutation, so the safety bar is lower. The description still adds genuine behavior: values are coerced ('42' becomes a number, true/false a boolean, a link a link, anything else words), an empty value removes the key, and the key becomes a {param:key} template that steps quote. Minor tension: 'keeps a named value' implies upsert semantics while idempotentHint is false, though repeated calls returning a fresh command id could explain that.

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?

Purpose, usage, value semantics, and removal are front-loaded in a short block with no filler. The only weak sentence is 'The answer is the command's id and a status', which duplicates the output schema.

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?

For a three-parameter mutation with an output schema and full annotation coverage, the description covers what the agent needs to call it correctly: purpose, when to reach for it, coercion, and the removal sentinel. Remaining gaps are overwrite behavior for an already-set key and any permission or failure conditions, both minor.

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 and the schema already conveys most parameter meaning, including that an empty value removes the key. The description still goes beyond it by explaining how `key` is consumed downstream as a {param:key} template and by detailing the coercion rules for `value`.

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 and resource: it keeps a named value on a run under `key`, and explains that steps and the run name reference it as {param:key}. That is far more concrete than the title alone, though it never names how it relates to sibling tools like set_date, so the agent must infer that a date-valued key belongs here rather than there.

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

Usage Guidelines3/5

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

It gives a use condition ('when the person tells you something the run should carry') and mentions the startsWith case, which is real guidance. But there are no exclusions and no named alternative, so the boundary with set_date or add_note is left implicit, and the phrase 'a startsWith value said after the start' assumes unstated context.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.