Skip to main content
Glama

Valuein — SEC EDGAR Fundamentals & Smart-Money Data

Save Agent

save_agent

Create or update a standing agent — a saved {goal + tickers + schedule} that fires either a fixed step recipe (agent_type="workflow", free/deterministic) or an AI-directed team (agent_type="autonomous", charged — settles against the owner's BYO key first, falling back to the managed wallet only if funded). Upsert semantics: omit agent_id to CREATE a new agent; pass an existing agent_id to UPDATE it. There is no separate update_agent — this does both, matching save_watchlist/save_thesis's house style. agent_type is STRUCTURAL and immutable: always required, and on an update it is verified against the existing agent before anything is changed — passing a different agent_type than the agent already has is rejected (delete and recreate to change the type). steps (an array of {kind:"tool"|"sop", name, args, label?}) is required and non-empty when CREATING an agent_type="workflow" agent, and must be omitted for agent_type="autonomous" (use managed_model there instead, itself optional and only valid for agent_type="autonomous"). when picks the trigger: "manual" (fires only via run_agent or the Workspace UI) or "schedule" (requires a schedule object — cadence "weekly" needs day_of_week, "monthly" needs day_of_month). This tool does NOT itself fire a run — use run_agent for that. Tier: sp500+ (sample rejected).

Input Schema

NameRequiredDescriptionDefault
goalYesWhat this agent is trying to accomplish — drives an autonomous agent's AI-directed team, and documents intent for a workflow agent's fixed steps.
nameYesHuman-readable label.
whenYesTrigger mode. "manual" fires only via run_agent/the UI; "schedule" requires the `schedule` object.
stepsNoFixed step recipe for agent_type="workflow". Required + non-empty when CREATING a workflow agent; must be omitted for agent_type="autonomous".
tickersYesUS tickers this agent operates over. Normalised to uppercase.
agent_idNoOmit to create a new agent; pass an existing agent's id (from save_agent/list_agents/get_agent) to update it.
scheduleNoRequired when when="schedule"; ignored otherwise.
agent_typeYesSTRUCTURAL and immutable. "workflow" = fixed step recipe, free/deterministic, requires `steps`. "autonomous" = AI-directed team, charged, may set `managed_model`.
managed_modelNoManaged-lane model override for agent_type="autonomous" only (e.g. when no BYO key is connected). Omit to use the account default.

Output Schema

NameRequiredDescriptionDefault
_metaYesProvenance envelope — data lineage for every MCP response
agentYes
createdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / _meta / properties / cost_usd / properties / basis / description
      Previous value: -"payg_charge = real charge (agent-pay or your balance). payg_rate_card = indicative price, not billed."New value: +"payg_charge = real pay-per-call charge (a card or MPP payment through agent-pay). payg_rate_card = indicative price, not billed."
  2. Changed2 schema fields changed
    • changedOutput schema / properties / _meta / properties / cost_usd / properties / basis / description
      Previous value: -"payg_charge = real agent-pay charge. payg_rate_card = indicative price, not billed."New value: +"payg_charge = real charge (agent-pay or your balance). payg_rate_card = indicative price, not billed."
    • changedOutput schema / properties / _meta / properties / cost_usd / properties / billed / description
      Previous value: -"true = this amount was actually charged via PAYG for this call. false = indicative PAYG-equivalent value; your plan already covers this call for free."New value: +"true = this amount was actually charged via PAYG for this call. false = indicative PAYG-equivalent value only: no charge was made for this call (it was within your plan)."
  3. Added
  4. Removed
  5. Changed1 schema field changed
    • changedOutput schema / properties / _meta / properties / fundamentals_as_of / description
      Previous value: -"ISO timestamp when the FINANCIAL STATEMENTS were last rebuilt. Use THIS — not `last_updated` — when telling a user how current the fundamentals are. The snapshot is republished on every weekday price refresh while the statements are carried forward unchanged, so `last_updated` can be far more recent than the numbers it sits next to."New value: +"ISO timestamp when the FINANCIAL STATEMENTS were last rebuilt in bulk. Use THIS — not `last_updated` — when telling a user how current the cross-sectional fundamentals are. The snapshot is republished on every weekday price refresh while the statements are carried forward unchanged, so `last_updated` can be far more recent than the numbers it sits next to. It is a floor for a single filer, not a ceiling: a filer with a live partition receives its filing, facts and ratios intraday (minutes after EDGAR dissemination), so an entity-scoped read may carry a filing newer than this; cross-sectional ranks (factor scores, earnings signals) refresh with the weekly bulk export."
  6. Added

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing billing behavior (BYO key first, managed wallet fallback only if funded), the immutable agent_type verification on update, and that a mismatched type is rejected. The remaining gap is update semantics for omitted fields — whether an update replaces or merges unspecified properties is never stated, which matters for an upsert with 9 fields and destructiveHint=false.

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?

Front-loaded with the core definition and upsert rule before the conditional constraints, and nearly every sentence carries a constraint. It is a single very dense block, though, and the immutability and billing points would read better split out rather than embedded mid-paragraph.

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 9-parameter, nested-schema mutation tool this covers type immutability, the create/update switch, billing, tier gating, and trigger semantics; the output schema covers return values. The one substantive omission is what happens to fields left out on an update, which an agent needs before safely issuing a partial update.

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 100%, so the baseline would be 3, but the description adds cross-field conditional constraints the schema cannot express: steps must be non-empty when creating a workflow agent and must be omitted for autonomous; managed_model is only valid for autonomous; when="schedule" requires a schedule with cadence-specific sub-requirements (weekly needs day_of_week, monthly needs day_of_month).

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+resource ('Create or update a standing agent') and immediately defines what an agent is ({goal + tickers + schedule}). It distinguishes itself from siblings by naming run_agent (which fires runs) and by explicitly stating there is no separate update_agent, matching the save_watchlist/save_thesis convention.

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?

Explicit routing rules: omit agent_id to create, pass one to update; use run_agent to actually fire a run; delete and recreate to change agent_type. It also states the access requirement (Tier sp500+, sample rejected), which tells an agent when the call will simply fail.

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.