Skip to main content
Glama

Formula References

formula_references
Read-only

Validates a formula expression and lists the direct field references it contains, so you can confirm which datasource fields a formula uses before editing or saving.

Instructions

Validate expression and read direct field occurrences from the native editor AST.

Uses internal ns.field names from datasource_get. String literals are not references. Source fingerprint checked across validation and parsing. Positions are UTF-16 code units, not Python character indices. This is not a transitive dependency graph, parameter inventory or deletion approval.

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": {
      "datasource_id": "<datasource_id>",
      "expression": "<expression>"
    },
    "name": "formula_references"
  }
}

Input Schema

NameRequiredDescriptionDefault
report_idNo
expressionYes
datasource_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.5

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description adds genuinely non-obvious behavior: string literals are excluded from references, source fingerprint is checked across validation and parsing, and positions are UTF-16 code units rather than Python indices. These details materially affect how an agent interprets and consumes results.

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 action, followed by short, information-dense clauses with no filler. The trailing negation list is long but earns its place by preempting plausible misreadings of the tool's scope.

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?

The tool has an output schema, so return values need not be described, and the readOnlyHint covers safety. The description covers the semantic edge cases (literals, fingerprint, UTF-16) that matter for correct interpretation; only report_id semantics and sibling routing remain uncovered.

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 coverage is 0%, so the description must compensate. It clarifies that datasource_id relates to datasource_get's internal names and that expression is a formula expression, but report_id is never mentioned and no format or constraint details are given for expression, leaving part of the parameter set unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb pair ('validate', 'read direct field occurrences') against a specific resource ('the native editor AST'). The negative clause ('This is not a transitive dependency graph, parameter inventory or deletion approval') further bounds the purpose, though it doesn't name a sibling tool directly.

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

Usage Guidelines3/5

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

Implies the usage context by noting it consumes 'internal ns.field names from datasource_get', which tells an agent where the input names originate. However, it never states when to call this versus formula_validate, which sits directly adjacent in the behavior space, and no explicit exclusion beyond the negative list is given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools