Skip to main content
Glama

Create, edit, activate, pause or archive a theme

save_theme
Destructive

Create, edit, activate, pause or archive one of YOUR themes (requires api:account). A theme is a named group of tickers with attribution. kind rule: the user's own words (rule_text), compiled once per save or edit into a ranked list. Tracked tickers (at most tracked_cap, at most 10: a theme never opens more than 10 Gambits) open a follow: each is followed as an ordinary Gambit, so it gets Gambit's take. They are chosen when the theme is saved, edited or activated, in this order: tickers the user added by hand or named in the rule (added_by user), then tickers with the most recent event in the last 7 days (an opportunity card or a news item on it), ties by rank. A member's tracked_by says why it is tracked. The rest, up to watched_cap, are watched: listed with their reason, no Gambit. Tiers do not move between those moments. kind manual: tickers the user adds by hand, tracked up to tracked_cap and watched past it. A Gambit the theme opened becomes the user's own, and no theme stops it, once the user follows that ticker with create_gambit or changes its monitoring. Every member records how it got in (added_by rule, news or user) and why (reason); every change is an event. rule_version counts the compiles of the rule; member_list_version counts the changes of the member list. A draft theme follows nothing; an active one follows its tracked members. Themes never trade. Pick the action. create: kind rule with name and rule_text (one compile, which counts against the limit of 10 compiles per user per UTC day (preview, a rule create, and an edit with rule_text each count); the tracked and watched members are saved with their reasons), or kind manual with name and symbols (up to 25 tickers; the first tracked_cap are tracked, the rest watched; no compile). status draft (the default; follows nothing) or active. tracked_cap (1-10, default 10: a theme never opens more than 10 Gambits) and watched_cap (0-90, default 90) are optional. edit (theme_id): name, tracked_cap, watched_cap, or rule_text, which compiles again (even the same text: a converted saved Gambit starts as a draft that was never compiled; edit it with its rule_text to compile it) and writes a new rule_version and member list. activate (theme_id): sets the tracked tickers again from the last 7 days' events, then follows each tracked member as a Gambit (a ticker the user already follows keeps its own Gambit and the theme links nothing); a rule theme must be compiled first. pause (theme_id): stops the Gambits this theme opened, unless another active theme tracks the same ticker; the user's own Gambits are never stopped (a Gambit the theme opened becomes the user's own once the user follows the ticker with create_gambit or changes its monitoring). archive (theme_id): the same, and the theme can no longer change. Confirm with the user before pausing or archiving. Returns the theme as get_theme does (plus changed for a status action). A user keeps at most 5 themes that are not archived (a server setting); over it the call answers 403 theme_limit_exceeded. Other errors: 404 theme_not_found; 409 invalid_transition, theme_not_compiled, theme_archived, tracked_cap_below_members; 422 unknown_symbol or ambiguous_symbol (with symbols), theme_compile_empty, caps_too_large; 429 theme_compile_limit; 502 theme_compile_failed; 503 themes_disabled. Nothing here places a trade.

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": {
      "action": "<action>"
    },
    "name": "save_theme"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoREQUIRED for create
nameNoREQUIRED for create
actionYes
statusNocreate only: draft (default) or active
symbolsNocreate (kind manual): tickers such as MU or xyz:MU
theme_idNoREQUIRED for edit, activate, pause and archive
rule_textNocreate (kind rule) or edit: the user's own words; compiles
tracked_capNo
watched_capNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations flag destructiveHint=true and non-idempotent, and the description goes well beyond that: pause stops the Gambits the theme opened unless another active theme shares the ticker, archive is terminal, user-owned Gambits are never stopped, and the 5-theme cap plus 10-compiles-per-UTC-day limit are spelled out. The compile-limit and per-user daily counter are exactly the kind of hidden cost an agent needs. Slight deduction because the same caveats (ten-Gambit ceiling, Gambit ownership transfer) are restated rather than systematically laid out.

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?

The content is valuable but delivered as one unbroken block with no paragraph breaks, and several clauses repeat verbatim ('a theme never opens more than 10 Gambits' appears twice; the Gambit-ownership transfer rule appears in both the tracking section and the pause action). Front-loading of purpose and action selection is good, but trimming the duplication would make it far more scannable.

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 nine-parameter, five-action mutation tool this covers nearly everything: return shape ('returns the theme as get_theme does, plus changed for a status action'), the full error taxonomy with codes (403 theme_limit_exceeded, 409 invalid_transition, 429 theme_compile_limit, 503 themes_disabled), and an explicit 'Nothing here places a trade'. With no output schema, that return description does the necessary work.

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

Parameters5/5

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

Schema coverage is only 67%, but the description compensates: it explains the kind rule/manual semantics, that symbols accepts up to 25 with tracked_cap tracked first and the remainder watched, that rule_text recompiles even when unchanged, the tracked_cap (1-10, default 10) and watched_cap (0-90, default 90) defaults, and which parameters each action requires. This adds meaning beyond the bare enums and bounds in 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?

Opens with a specific verb set (create, edit, activate, pause, archive) scoped to 'YOUR themes' and then enumerates each action. It clearly distinguishes itself from read-side siblings like get_theme, list_themes and preview_theme, and from member-level tools like add_to_theme.

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

Usage Guidelines5/5

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

Explicitly says 'Pick the action' and then gives the preconditions for each one (kind rule needs name and rule_text, edit needs theme_id, activate requires a compiled rule theme, confirm with the user before pausing or archiving). It also names the preview step that counts against the compile limit, effectively routing the agent to preview_theme first.

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.

Resources