Skip to main content
Glama

Edit Screen (change a formula you have)

edit_screen
Read-only

CHANGE a screener formula you already have — add, remove or replace conditions as ops; the server places, resolves and merges them and checks the result (no engine JSON to write). Use it for EVERY change while building a screen with the user; use screen_unified (mode 'run') when the user wants to SEE the stocks of a formula. Returns {ok, criteria (the new formula, saved shape — screen_unified takes it verbatim in criteria), changes (what each op became: status resolved|snapped, value, snaps / dropped / assumed = what the engine read differently), issues (what did not go in: code, and nearest / candidates = alternatives ready to send back as an op's value), keep (the user-set paths after the change), reset, charts (when conditions were split across charts), count?}. Nothing is saved — the client decides what to apply.

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": {
      "ops": "<ops>"
    },
    "name": "edit_screen"
  }
}

Input Schema

NameRequiredDescriptionDefault
opsYesThe changes, in order (1–8): ONE condition per op, written exactly as screen_unified takes it (same fields), plus WHERE it goes (op / target / step / rel).
keepNoPaths of values the USER set by hand ('ta.0.anchor.0.b', 'universe.include.0.country') — never overwritten or removed unless an op says user_asked.
modeNo'check' = place, resolve and validate (fast, no market data) · 'count' = also how many stocks match the new formula (exact up to 500).check
criteriaNoThe formula to change, in the saved shape — the user's current formula or an `executed_criteria` / `criteria` a screen tool returned. Omit (or {}) to build from empty.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only supply readOnlyHint=true, and the description explains why ('Nothing is saved — the client decides what to apply'), so the read-only hint is not contradicted but reinforced. It adds real behavior beyond annotations: the server resolves/snaps values, reports dropped or assumed readings, surfaces issues with `nearest`/`candidates` for retry, and protects hand-set paths in `keep` unless `user_asked`. With no output schema, the enumerated return shape (ok, criteria, changes, issues, keep, reset, charts, count) is genuinely necessary disclosure.

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 verb and the routing rule, then a single compact block for returns; nearly every clause carries information. The returns enumeration is dense shorthand with heavy parentheticals, which is defensible given there is no output schema, but it makes the middle section harder to scan.

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 deep, nested schema with four top-level params and no output schema, the description covers the missing pieces: what the tool does not persist, what the response contains, how to chain into screen_unified with the returned `criteria`, and how to recover from rejected conditions via issues/nearest. Nothing an agent needs in order to call it correctly is absent.

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 description coverage is 100%, so the nested EditOp/TaSignal/ScreenCondition fields are already documented at source; baseline would be 3. The description still adds cross-parameter meaning the schema cannot: `criteria` is the saved shape that 'screen_unified takes it verbatim', and `keep` holds user-set paths that must not be overwritten without `user_asked`. It does not elaborate on the `mode` values beyond the schema, which keeps it at 4 rather than 5.

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?

States a specific verb and resource ('CHANGE a screener formula you already have') plus the mechanics ('add, remove or replace conditions as ops; the server places, resolves and merges them'). It explicitly distinguishes itself from screen_unified, so an agent can route between editing and running without opening either schema.

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?

Gives an explicit rule: 'Use it for EVERY change while building a screen with the user', and names the alternative with the selecting condition — screen_unified (mode 'run') when the user wants to SEE the stocks. The schema also splits mode 'check' vs 'count', so both when-to-use and when-not are covered.

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.