Skip to main content
Glama

NEM Explorer (ScadaMiner)

store_result

Materialise a SELECT into a private scratch table you can re-query and JOIN in later execute_sql calls — without re-piping rows through the conversation. Use it as a scratchpad for multi-step analysis: pull a slice once, store it, then derive several things from it. Call start_question first and pass its question_id — the scratchpad is scoped to your question. Also pass a short name (lowercase letters/digits/underscores, e.g. gen_by_region) and the sql (a single read-only SELECT/WITH over consolidated.* / semantic.*, or over your own earlier scratch tables). The result lives in the scratch database; the returned qualified_name is what you reference later — e.g. SELECT ... FROM <qualified_name> JOIN consolidated.x ... (remember to pass the same question_id on that execute_sql call). Returns the schema, row count, a few sample rows (the full data stays in ClickHouse), and time_window — the range the stored rows actually cover. Check that window against the window your question is about: the table name records the measure, not the period, so a too-tight WHERE here is invisible later. Re-storing the same name overwrites it. Tables are private to your question, capped in count and size, and expire automatically. Prefer this over re-running a big query whenever you need an intermediate result in more than one later step.

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": {
      "name": "<name>",
      "sql": "<sql>"
    },
    "name": "store_result"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesA single read-only SELECT/WITH to materialise. May read `consolidated.*`, `semantic.*`, or your own earlier scratch tables. The rows are stored in ClickHouse, not returned through the conversation.
nameYesShort handle for the scratch table — lowercase letters, digits, and underscores only, starting with a letter (e.g. `gen_by_region`). Re-using a name overwrites that table.
question_idNo**Required.** The UUID from a `start_question` call — the scratchpad is scoped to it. Call `start_question` first if you don't have one.

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 declare the safety profile and idempotency; the description adds substantial context beyond them: scratch tables are private per question, capped in count and size, expire automatically, and re-storing the same name overwrites. It also discloses the return payload (schema, row count, sample rows, time_window) and warns that a too-tight WHERE is invisible later because the name records the measure, not the period.

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?

Purpose and the start_question prerequisite are front-loaded, and the sentence order follows the actual workflow. It is dense and long for a single paragraph, with a couple of details (sample rows, time_window explanation) that could be tightened, but almost every sentence carries operational value.

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 three-parameter tool with no output schema, the description covers prerequisites, input constraints, overwrite semantics, lifecycle and caps, and what is returned. Nothing an agent needs in order to call it correctly or interpret the result is missing.

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 coverage is already 100%, but the description adds genuine meaning: it flags question_id as required despite the schema's nullable default of null, ties name to the qualified_name later used in FROM clauses, and constrains sql to read-only SELECT/WITH over consolidated.*, semantic.*, or earlier scratch tables. Minor remaining gap is no guidance on size limits versus the 'capped in count and size' behavior.

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 — materialise a SELECT into a private scratch table — and immediately contrasts it with re-piping rows through the conversation and re-running queries. An agent can distinguish it from execute_sql and fetch_result_rows without opening any 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?

Explicitly frames the tool as a scratchpad for multi-step analysis and gives a decision rule: prefer it over re-running a big query whenever an intermediate result is needed in more than one later step. It also states a hard prerequisite (call start_question first and pass its question_id) and the passthrough requirement on later execute_sql calls.

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.