Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
FRED_API_KEYNoAPI key for FRED, needed to download FRED macro series.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

MacroStress answers one question: how the target indicators of an object are distributed if a given event happens. A scenario s = (N, m, O, D, C) is built from the text of the event and the corpus; the conditions extend the description of the event, and the models compute its consequences.

Read a guide before the work it covers: guide(name="scenario-from-corpus") when the user names an event or asks what happens if it occurs, even without the words scenario or corpus; guide(name="run-report") before a calculation or its report; guide(name="drivers") before work on drivers and satellites; guide(name="model-inputs") before answering the questions of a model that declares inputs; guide(name="elicitation-orchestration") before running that interview with several agents, one per shock. guide() lists them.

When the user asks you to answer a model's questions or to act as its expert, start with elicit(action="next", as_of=..., model_id=...). It gives ONE small question with its schema and answer_call. Copy answer_call, add payload with your own answer object and call elicit again. Each answer saves a part and returns the next question; continue until complete=true. Do not ask the human for numbers, substitute placeholders, or build a full shock table. Partial answers survive restarts but cannot be estimated until all parts pass the full check. elicit(action="list", ...) lists input keys and action="status" says which are complete. Full question/write actions remain under model(kind="inputs"). When complete, model(kind="macro", action="estimate", ...) builds the version from the answers. The questions and the answers live in that tool: reading sources or searching the files of the workspace does not answer them, and several installed models that ask questions need model_id. The agent is the expert of that interview: the numbers are its own quantitative judgements from the state table the question prints and from the model corpus; it does not ask the human for them and does not take them from tests or fixtures. The market variant reads the model corpus, so its answers need that corpus indexed and fetched first.

Search the corpus before writing any number of a scenario. Mark a condition or an impact with "event" when the text of the event states its number, with a corpus fragment only when the fragment gives its number, and with "assumption" otherwise. When neither the event nor the corpus gives a number, propose one from the nearest episode and mark it "assumption": a scenario with no conditions and no impacts records no event, and questions to the user come after the scenario, not instead of it. A human approves a scenario: never fill approved_by yourself and never start a calculation that was not asked for.

A tool that starts a job returns its id at once. Wait with jobs(action="wait", id=): the server holds the call until the job ends, and jobs(action="log", id=) shows what it printed.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tasks
{
  "list": {},
  "cancel": {},
  "requests": {
    "tools": {
      "call": {}
    },
    "prompts": {
      "get": {}
    },
    "resources": {
      "read": {}
    }
  }
}
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
guideA

The working guides of the agent: how to do the work, whatever the client.

Without name, the list. scenario-from-corpus turns an event into a scenario; read it before scenario save.

jobsA

Workspace and task state. Actions: state, status, log, cancel, wait.

wait polls the job server-side, so one call replaces the loop of status and log calls an agent would otherwise run while a long job works; it returns the record status returns, and running says whether to call it again.

seriesC

Stored series. Actions: search, get, add, update.

update fetches the named ids; with quantity it instead discovers the objects of that driver quantity and fetches their series.

corpusB

The scenario corpus and the model corpus. Actions: search, get, list, add, index, fetch.

corpus="model" works with the corpus of the models — the material a model's elicitation reads: episodes, the state at the date, transmission reviews, market expectations — which has its own manifest and index under corpus-model/. search and get read the index as it was on as_of; list shows what the manifest holds; add registers a file downloaded by hand under its key. index and fetch are tasks on the corpus resource. Inside a bench session every call and its answer go to the journal of the event.

scenarioA

Stored scenarios. Actions: list, get, save, validate, reverse.

Read guide(name="scenario-from-corpus") before building one. save checks the contract and writes scenarios/<id>.json; validate loads the macro and satellite versions the file names and names every problem that keeps the scenario from being computed, including corpus fragments not visible on the calculation day when the index exists, and reports how the elements are marked and what the scenario leaves unsaid under labels and warnings. reverse searches the scenario's family on portfolio: the worst loss under the price kappa, or the lowest price whose loss reaches level. bench returns the text of the bench event and starts its journal of corpus calls; build the scenario by the guide, then bench_save checks spec and keeps it with the journal and notes in the bench results, beside an empty review the expert fills. A bench scenario is never approved and never computed.

runA

Runs on the paths of a scenario. Actions: start, status, result, list.

Read guide(name="run-report") first. start draws the scenario's paths and calculates a portfolio's positions — or the positions given in the call — on them, as a job on the runs resource; status reports that job and what the run has written, result the per-position results, the conditional forecast of the targets (forecast.json: P5/P50/P95 of every target driver by month, in its own unit; every driver when targets is omitted) and the report of a portfolio run, list every run of the workspace. base_currency is the base of positions; a portfolio brings its own.

portfolioB

Stored portfolios. Actions: list, get, save, delete, check, exposure.

save checks the contract and writes portfolios/<id>.json; check names every position the scenario's macro and satellite versions cannot serve, with the reason of a driver the out-of-sample check rejected, and warns what an impact on a macro variable reaches through the positions' drivers, with the long-run loading of each one (below 0.1 it barely reacts); exposure values the positions at the calculation month of the scenario's macro version.

modelA

Model versions and plugins. kind: macro, satellites, inputs, catalog.

The episode check of the models is backtest (python -m mst.metrics). Actions for macro: list, describe, base, estimate, backtest; for satellites: list, describe, estimate; for catalog: list, the installed model plugins. base gives p5, p50 and p95 of the macro variables under the base s_0 by month, up to horizon, in the model scale, for only the variables named; it starts no job. model_id names the macro model to estimate or backtest — the only one installed when omitted; assignment maps a quantity to the satellite model that estimates it in an estimate of the satellites, overriding the model that declares it. version is the version hash describe and base read and the macro version the satellites of an estimate are built on; list takes no version.

inputs is the elicitation a model that declares inputs is estimated from; the elicit tool serves the same four actions and is the one to call when the user asks for the answers of a model's questions. list and status name every key written or missing, question gives the text the agent reads before answering and write checks the answer's form and stores it. The inputs are written by the agent itself and no human approves them — read guide(name="model-inputs") first — and model_id and as_of name the model and the date; a refused answer comes back with the field it was refused for.

elicitA

Answer a macro model's questions in small resumable steps.

Start with next and model_id/as_of. It gives one small question, its schema and answer_call. Copy answer_call with your answer object as payload to answer; the result saves it and gives the next question. Continue until complete=true. Each response step asks nine numbers, not a full shock table. Partial answers survive a restart and never count as a completed input. Never substitute placeholders or ask the human for numbers. next resumes the first missing step.

A model that declares inputs is estimated from the agent's own answers, not from the series: list names every input key on the date and status repeats the summary. Full question/write operations belong to model(kind="inputs"), not this interview. The agent is the expert: the numbers are its own judgements, not the human's and not the fixtures of the tests. When nothing is missing, build the version: model(kind="macro", action="estimate", model_id=..., as_of=...) starts a job, and jobs(action="wait", id=...) holds until it ends. The same actions are kind="inputs" of the model tool.

interviewA

Track the interview of a model: ownership, progress, review and corrections.

progress names every input key with its state, owner, answered parts and publication; call it before handing a shock to an agent. claim gives one key to one agent; a live claim of another agent refuses a second writer. release drops the caller's claim. restart resumes an agent whose run stopped — a network error, a timeout, a crashed client: it renews that agent's claim and returns the first missing part, so the same agent continues where the saved parts end and nothing is asked twice. audit lists the advisory findings of one published answer or of every one. accept records that the warnings were reviewed, with the reason; reopen asks named parts again, keeps the old answer as a version and makes the key missing until it is complete again. history lists the versions of one answer and journal the last events of the interview.

This tool never writes an answer: the numbers come only through elicit. The orchestrating agent owns the process: it hands one shock to one subagent, reads the warnings and either accepts the answer or reopens the steps they name.

Prompts

Interactive templates invoked by user choice

NameDescription
scenario_from_eventBuild a scenario from the text of an event, by the corpus, for a human to approve.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.5/5.0

Scored across 10 tools

Disambiguation3/5

The tools are organized around distinct resources, but there is real overlap between elicit and model(kind="inputs"), and between jobs status/wait and run status. The rich descriptions help, but an agent can still hesitate over which tool owns an operation such as checking a run or supplying model inputs.

Naming Consistency4/5

Names are consistently lowercase and mostly resource-oriented, which is readable across the set. Minor deviations are 'elicit' as a verb and 'jobs' as a plural among otherwise singular resource nouns.

Tool Count4/5

Ten tools is a reasonable count for a complex macro stress-testing server. However, each tool packs many actions and modes, so the effective surface is much larger than the count suggests, and a few tools such as model and elicit could be cleaner if separated.

Completeness4/5

The surface covers the core lifecycle: series, portfolios, scenarios, models, elicitation, interviews, runs, and jobs. The main gaps are missing delete operations for several resources such as series, scenarios, and corpus entries, but these are not central blockers for the main workflows.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues