Skip to main content
Glama

get_numeric_expression

Read-onlyIdempotent

Read one Numeric Expression (by expressionId or label) or, with both omitted, every expression in the survey. Decodes the stored formula's {{que:id}}/{{exp:id}} recall tokens back to readable question/expression labels (readableFormula, e.g. "20+[1. How satisfied are you?]-[6. How likely are you to return?]...") and flags hasDanglingReference: true on any expression containing a token whose question/expression id no longer exists — the exact failure mode behind "my expression returns 0 / doesn't return the expected sum": nothing in the BlockSurvey builder itself validates a stored expression's tokens, so a stale or malformed one is otherwise invisible until a respondent's score comes back wrong. Use this to diagnose that before rebuilding an expression from scratch. Also returns each expression's conditional overrides (if any, decoded the same way) and its recallToken ({{exp:<id>}}) — only paste that into update_question / update_thankyou_screen if the user separately asks to display the score somewhere, never on your own initiative.

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": {
      "surveyId": "<surveyId>"
    },
    "name": "get_numeric_expression"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelNoRead only this expression, by its current name. Provide this OR expressionId OR neither (to list all).
teamIdNoWhich team workspace to act in (ids come from get_account_info or list_surveys). Optional: if omitted, the server uses the team that owns the given surveyId, or your only team. Required for create_survey when you belong to several teams.
surveyIdYesThe Survey ID to read expressions from
expressionIdNoRead only this expression, by id. Provide this OR label OR neither (to list all).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), yet the description still adds real behavioral context: token decoding into readableFormula, the hasDanglingReference flag and what it means, conditional overrides being decoded the same way, and the recallToken caveat. That is meaningfully beyond what the structured fields disclose.

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 read semantics before the diagnostic rationale, and every sentence carries information. It is dense though: the second sentence is very long with a parenthetical example formula and an em-dash aside, which could be split for scannability.

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?

No output schema exists, so the description must carry the return shape, and it does: readableFormula with a worked example, hasDanglingReference semantics, decoded conditional overrides, and recallToken. Combined with full schema coverage, an agent has everything needed to call and interpret this tool.

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 description coverage is 100%, so the schema already defines surveyId, label, expressionId and teamId, including the label/expressionId/neither selection rule. The description restates the same selection semantics ("by expressionId or label ... both omitted") without adding format, precedence, or conflict-handling detail beyond the schema, so baseline 3 applies.

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 and resource ("Read one Numeric Expression") and immediately defines the fallback scope ("with both omitted, every expression in the survey"), which cleanly separates it from the add/update/delete_numeric_expression siblings. It also states the diagnostic value proposition, so an agent knows why it would pick this over a rebuild path.

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 when-to-use ("Use this to diagnose that before rebuilding an expression from scratch") tied to a concrete symptom ("my expression returns 0 / doesn't return the expected sum"). It also gives an explicit when-not along with the alternative tools: the recallToken should only go into update_question / update_thankyou_screen if the user separately asks, "never on your own initiative."

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