Skip to main content
Glama
splunk-mcp-readonly

splunk-mcp-readonly

by lfjuarez

explain_spl

Validate SPL queries against safety rules without executing them or sending anything to Splunk, so you can confirm a search is safe before running it.

Instructions

Check an SPL query against the safety rules without running it.

Use this to validate a search before search. Nothing is sent to Splunk.

Args: spl: The SPL query to validate.

Returns {"ok": bool, "normalised": str | None, "reason": str | None}.

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": {
      "spl": "<spl>"
    },
    "name": "explain_spl"
  }
}

Input Schema

NameRequiredDescriptionDefault
splYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description does real work: it discloses the critical side-effect posture ('Nothing is sent to Splunk', 'without running it') and describes the response keys including a `normalised` field, which hints the query is rewritten/normalized. It omits auth requirements, failure modes, and rate limits, keeping it below a 5.

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 purpose and constraint in two short sentences, then a compact Args block and a precise Returns signature. The Args line is close to redundant with the parameter name but costs little.

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 single-parameter, non-destructive validator with an output schema present, the definition covers what it does, when to call it, side effects, and return shape. The only meaningful gap is what an `ok: false` result implies and whether the `normalised` string is what should be passed on to `search`.

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% and the only parameter is documented as 'The SPL query to validate', which merely restates the name. It adds no format constraints an agent would care about, such as whether pipes, leading `search`, time ranges, or subsearches are permitted.

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?

'Check an SPL query against the safety rules without running it' gives a specific verb (validate/check), a specific resource (SPL query), and a scope constraint (against safety rules, no execution). It is immediately distinguishable from the sibling `search`, which actually runs the query.

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

Usage Guidelines4/5

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

Explicitly states the trigger ('Use this to validate a search before `search`') and names the alternative it precedes, which is the key routing decision. It stops short of saying whether validation is mandatory or optional, or what to do when the result is not ok.

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