Skip to main content
Glama

Publish a routine under a short code

publish_routine

Publishes a routine under an eight-character code, at routinerun.com/c/: a short address for a message, a QR code or an NFC tag. Anybody with the code can read it — the page lists the steps, and on an iPhone they open one at a time in the App Clip with nothing to install. Only the steps go up: the name, the descriptions, minutes, and buttons that open a link or copy words; actions, triggers, values, notes and dates come off. With them goes an identifier of the phone that publishes, the same on every code it publishes, so a stranger can block that phone's codes and nobody else's. Use it only when the person asked to publish or share a routine with someone. Nothing is public until the person says so on their phone: it shows them exactly what would go up, with Publish and Drop. The answer is the command's id and a status; command_status says done with the address once they publish. Give code to replace a routine this connection published before; the address stays the same.

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": {
      "written": "<written>"
    },
    "name": "publish_routine"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNoA code this connection published before, to replace what it holds. Leave it out for a new code.
writtenYesThe routine as one JSON object in the form, with "routineRun": 2, a name and its steps. JSON text is read too.

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. Changed8 schema fields changed
    • changedOutput schema / properties / code / description
      Previous value: -"The eight-character code."New value: +"For publish_routine, once published: the eight-character code, which publish_routine takes again to replace it."
    • addedOutput schema / properties / command
      Added value: +{
      +  "description": "The command's id, which command_status takes.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / run
      Added value: +{
      +  "description": "The run it started, planned or found, where there is one: what set_value, next_step and the rest take.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / status
      Added value: +{
      +  "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"
      +}
    • removedOutput schema / properties / steps
      Removed value: -{
      -  "description": "How many steps went up.",
      -  "type": "integer"
      -}
    • removedOutput schema / properties / updated
      Removed value: -{
      -  "description": "True when an earlier routine under this code was replaced.",
      -  "type": "boolean"
      -}
    • changedOutput schema / properties / url / description
      Previous value: -"routinerun.com/c/<code>, the address to share."New value: +"For publish_routine, once the person has published it: routinerun.com/c/<code>, the address to share."
    • changedOutput schema / required
      Previous value: -[
      -  "code",
      -  "url"
      -]New value: +[
      +  "command",
      +  "status"
      +]
  2. Added

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnly=false, openWorld=true, idempotent=false, destructive=false, but the description adds substantial behavior: exactly which fields are uploaded (name, descriptions, minutes, buttons) and which are stripped (actions, triggers, values, notes, dates), the phone identifier published with every code and its blocking implication, and the on-device Publish/Drop consent gate. It also discloses the response shape (command id plus status) and points to command_status for the final address, which is meaningful extra context for a write tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core action and address format, and most sentences carry real information. However, the paragraph is long and a few clauses are convoluted (the phone-identifier/blocking sentence, and the trailing `code` sentence after the response-shape sentence), making the flow harder to scan than it needs to be.

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?

For a two-parameter, outward-facing publish tool with an output schema, the description covers the payload filtering, the consent flow, the replacement semantics, and the async command/status pattern. An agent has everything needed to decide to call it and to interpret the answer.

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 coverage is 100%, so both parameters are already documented, and the schema itself explains `code` as a previously published code to replace. The description reinforces that the address stays the same on replacement and clarifies which nested fields of `written` are actually retained, which is a modest but genuine addition over the schema.

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?

Names a specific verb and resource ('Publishes a routine') plus the concrete artifact produced (an eight-character code at routinerun.com/c/<code> usable for a message, QR code or NFC tag). This clearly separates it from unpublish_routine and routine_link without needing their schemas.

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 an explicit gating condition: 'Use it only when the person asked to publish or share a routine with someone,' and adds that nothing is public until the person confirms on their phone. It stops short of naming the sibling alternatives (unpublish_routine, routine_link) or stating when not to use it in terms of those tools.

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.