Skip to main content
Glama

Validate chart formulas

validate_chart_formulas
Read-only

Validate Formula Endpoint

When to use: ROAS·공헌이익 같은 사용자 정의 수식을 대시보드에 저장하기 전에, 문법과 인자 개수가 올바른지 미리 검증할 때.

Limitations: 차트 컴파일 도구(compile_chart_body)는 수식을 검증하지 않고 그대로 통과시키므로, 수식이 들어간 차트는 저장 전에 이 도구로 먼저 검증해야 한다. 인자 개수(arity)·컬럼 존재 여부(available_columns 를 준 경우)· 수식 간 순환 참조만 검사하며, 계산 결과 값 자체가 맞는지는 보장하지 않는다. 한 번에 최대 50개 수식까지 검증 가능.

Examples:

  • Q: 이 수식이 대시보드에 저장해도 되는 형태인지 확인해줘 params: {'body': {'expressions': [{'name': 'ROAS', 'id': 'roas', 'expression': {'type_tag': 'BIN_FUNCTION', 'function_name': 'DIVIDE', 'lhs': {'type_tag': 'COLUMN', 'lhs': 'net_sales'}, 'rhs': {'type_tag': 'COLUMN', 'lhs': 'ad_spend'}}}]}}

Output shape: object: {valid, errors[]}

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": {
      "expressions": "<expressions>"
    },
    "name": "validate_chart_formulas"
  }
}

Input Schema

NameRequiredDescriptionDefault
expressionsYes
available_columnsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety is covered; the description adds substantive behavior: it checks only arity, column existence (when available_columns is supplied) and circular references, and explicitly does not guarantee computed results are correct, plus a 50-formula batch cap. That cap duplicates the schema's maxItems=50, a minor redundancy rather than added value.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The header labels (When to use / Limitations / Examples / Output shape) make it scannable and front-loaded, but the 'Validate Formula Endpoint' opener restates the tool name, the output shape line duplicates an existing output schema, and the inline example JSON consumes a large share of the text for one illustration.

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 two-parameter validation tool with an output schema, the description covers the essential unknowns: scope of checks, what is not guaranteed, the batch limit, and the sibling that silently skips validation. It stops short of describing how per-formula errors are keyed or what error categories appear, which would matter for a batch-of-50 call.

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 reported as 0% at the top level, though the nested $defs are richly documented, so the description must contribute meaning. It does add one real semantic point — column-existence checking applies only when available_columns is provided — and the example shows the expressions payload shape, but it never explains the id-vs-name distinction or data_type handling that the schema defers to nested docs.

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?

Beyond the tautological 'Validate Formula Endpoint' heading, the description states concretely what is checked: syntax and argument arity of user-defined formulas (e.g. ROAS/contribution-margin) before they are saved to a dashboard. It implicitly separates itself from compile_chart_body by noting that tool passes formulas through unvalidated, so an agent can tell the two apart.

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 'When to use' states the precondition (before saving formulas to a dashboard) and the 'Limitations' section names the alternative, compile_chart_body, along with the reason to prefer this tool for any chart containing formulas. The condition that selects this tool over the sibling is spelled out rather than inferred.

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