Skip to main content
Glama

NEM Explorer (ScadaMiner)

run_capability

Read-onlyIdempotent

Build (and optionally execute) a deterministic plan from a registered capability. Pass capability_id plus your question_id from start_question — the server re-derives the typed params from your question, so you can leave params as {} and don't need to know a capability's internal fields. Pass params only to refine a derived value (e.g. a specific region or date range); supplied keys override the derived ones. When you do send params, send only the fields params_contract marks required: everything else is optional, and the server applies schema defaults and rebuilds server_derived labels (chart titles, date-range prose, station and interconnector display names) from what you sent — never invent values for those. If something is genuinely missing you get every missing field back in one error, so one correction is enough. Returns the generated SQL, a chart spec, and a short data description — identical to what the chat pipeline would emit for the same capability. Pass execute: true to also run the SQL and get rows back (capped at the server's MCP_MAX_RESULT_ROWS limit) plus, when supported, a deterministic markdown answer. result has execute_sql's shape: a large result returns its first rows plus a result_id (page with fetch_result_rows, chart with build_chart); the answer and chart_figure are always built from every row. A chart_figure too big to inline comes back as a handle instead (chart_id, chart_url, summary, outline); see "Working with large results". Otherwise inspect the SQL and run it yourself with execute_sql.

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": {
      "capability_id": "<capability_id>"
    },
    "name": "run_capability"
  }
}

Input Schema

NameRequiredDescriptionDefault
paramsNoTyped parameters for the chosen capability. **Optional when you passed a `question_id`** (from `start_question`): the server re-derives the params from your question, so `{}` is fine and you don't need to know each capability's internal fields. Anything you do pass overrides the derived value for that key — use it only to refine (e.g. a specific region or date range). Shape is capability-specific; see `list_capabilities`. Must be a JSON object (`{}`). Without an explicit `type: object` annotation, some MCP clients (e.g. Claude Code) stringify the value before sending; the explicit schema prevents that (#1144).
executeNoWhen true, execute the generated SQL and return rows alongside the plan. Rows are still capped at `MCP_MAX_RESULT_ROWS`. Defaults to false — callers can inspect the SQL and decide whether to run it.
question_idNoOptional UUID returned by an earlier `start_question` call. When provided, this tool call is attributed to that question, and so is a parked result.
capability_idYesStable capability ID, e.g. `constraint_frequency_by_interconnector`. Call `list_capabilities` first to discover available IDs and their per-capability parameter schemas.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare read-only/idempotent/open-world; the description adds substantial behavior beyond them — derive-from-question semantics, override precedence, server rebuilding of server_derived labels, consolidated missing-field errors, MCP_MAX_RESULT_ROWS capping, result_id/result shape, and the chart_id/chart_url handle for oversized figures. None of this contradicts readOnlyHint; executing SQL remains a read.

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 purpose and the params rule, then execution and result handling, so it reads in priority order. It is dense and long, and it leans on an external section title ('Working with large results') for the oversized-figure case, which is the one place the reader is sent elsewhere.

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 carries the return contract — SQL, chart spec, description, optional rows, optional markdown answer, and the handle fallback — plus pagination and charting next steps. For a four-parameter tool with nested free-form params, an agent has everything needed to call it and interpret the response.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, yet the description still adds meaning the schema cannot: params is optional when question_id is present, supplied keys override derived values, and only fields marked required by params_contract should be sent while server_derived labels must never be invented. This is genuine semantic guidance rather than restatement.

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 ('Build (and optionally execute) a deterministic plan from a registered capability') and immediately distinguishes itself from the planning-only and execution-only paths by naming execute_sql and list_capabilities. An agent knows exactly what this does and what it produces (SQL, chart spec, data description).

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 routing: use this with a capability_id plus question_id, leave params as {} unless refining a derived value, set execute:true only when rows are wanted, and 'Otherwise inspect the SQL and run it yourself with execute_sql' names the alternative and the condition that selects it. Prerequisites (list_capabilities first, start_question for question_id) are stated.

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.