Skip to main content
Glama
splunk-mcp-readonly

splunk-mcp-readonly

by lfjuarez

search

Run read-only SPL queries and return bounded result rows, blocking write, delete, export, or execute commands and applying time-range and row-limit safeguards.

Instructions

Run a read-only SPL search and return the result rows.

The search is validated first: commands that write, delete, export or execute (delete, outputlookup, collect, sendemail, script, map, ...) are refused. A leading search is added when missing and | head N is appended so results are always bounded.

Args: spl: The SPL query, e.g. index=wineventlog EventCode=4625 | stats count by src_ip. earliest: Start of the time range, Splunk syntax (default -24h). latest: End of the time range (default now). max_rows: Maximum rows to return (default 100, capped by the server, hard limit 1000).

Returns a dict with results (list of rows), count, spl (the SPL actually run), and truncated when the row limit was reached. On failure returns {"error": ...}.

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": "search"
  }
}

Input Schema

NameRequiredDescriptionDefault
splYes
latestNonow
earliestNo-24h
max_rowsNo

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, the description carries the full behavioral burden and does so well: it discloses the write-command denylist with concrete examples, the automatic leading `search`, the appended `| head N`, defaults for time range and row count, the server-side cap of 1000, and truncation semantics. It omits authentication/permission requirements and timeout or rate-limit behavior, which keeps 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 core action, then a structured Args block, then returns. Every sentence carries information, though the returns paragraph partially restates what the output schema already provides; minor redundancy, no waste 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?

For a four-parameter mutation-free query tool with an output schema, the description covers purpose, refusal behavior, query rewriting, defaults, and bounding. Nothing an agent needs in order to call it correctly is missing, given the output schema documents the return shape.

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 description coverage is 0%, so the description must compensate, and it documents all four parameters: `spl` with a concrete example query, `earliest`/`latest` with Splunk time-syntax framing and defaults (`-24h`, `now`), and `max_rows` with its default of 100 and hard server cap of 1000. This is meaning well beyond the bare schema titles and defaults.

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 and resource: "Run a read-only SPL search and return the result rows," plus the scope that it validates and bounds the query. It implicitly separates execution from siblings like explain_spl, but never names an alternative, so it stops short of full sibling differentiation.

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?

Gives strong context about what the tool will and won't do (write/export/execute commands refused), which implies when it is appropriate. However, it never says when to prefer explain_spl, list_indexes, or list_saved_searches over this tool, so routing guidance is left to inference.

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