Skip to main content
Glama
deslicer

MCP Server for Splunk

by deslicer

Get Metadata

get_metadata

Retrieve distinct hosts, sourcetypes, or sources from a specific Splunk index to build accurate queries. Use pagination with offset when more results are available.

Instructions

Retrieve distinct metadata values for a given index to aid query construction. Use this when you need hosts, sourcetypes, or sources in an index. If has_more is true, call again with offset=next_offset.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldNo'host', 'sourcetype', or 'source' (default 'host')host
indexYesTarget index (e.g. 'main')
limitNoPage size. Default 100. Maximum 100. Values above 100 are capped; 0 uses 50. Do not send a larger limit.
offsetNoResult offset (default 0)
latest_timeNoEnd time (default 'now')now
earliest_timeNoStart time (default '-24h@h')-24h@h

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.12
    • changedInput schema / properties / limit / description
      Previous value: -"Page size 1-100 (default 100)"New value: +"Page size. Default 100. Maximum 100. Values above 100 are capped; 0 uses 50. Do not send a larger limit."
  2. Changed6 schema fields changedv0.6.11
    • changedInput schema / properties / earliest_time / description
      Previous value: -"Search start time (e.g., '-24h@h') (default: '-24h@h')"New value: +"Start time (default '-24h@h')"
    • changedInput schema / properties / field / description
      Previous value: -"Metadata field to list values for. One of 'host', 'sourcetype', or 'source' (default: 'host')"New value: +"'host', 'sourcetype', or 'source' (default 'host')"
    • changedInput schema / properties / index / description
      Previous value: -"Target index to inspect (e.g., 'main', 'security')"New value: +"Target index (e.g. 'main')"
    • changedInput schema / properties / latest_time / description
      Previous value: -"Search end time (e.g., 'now') (default: 'now')"New value: +"End time (default 'now')"
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of distinct values to return (default: 100)"New value: +"Page size 1-100 (default 100)"
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Result offset (default 0)",
      +  "type": "integer"
      +}
  3. Changed5 schema fields changedv0.6.1
    • addedInput schema / properties / earliest_time / description
      Added value: +"Search start time (e.g., '-24h@h') (default: '-24h@h')"
    • addedInput schema / properties / field / description
      Added value: +"Metadata field to list values for. One of 'host', 'sourcetype', or 'source' (default: 'host')"
    • addedInput schema / properties / index / description
      Added value: +"Target index to inspect (e.g., 'main', 'security')"
    • addedInput schema / properties / latest_time / description
      Added value: +"Search end time (e.g., 'now') (default: 'now')"
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of distinct values to return (default: 100)"
  4. Changed1 schema field changedv0.5.1
    • addedInput schema / additionalProperties
      Added value: +false
  5. First observedv0.5.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses pagination behavior ('If has_more is true, call again with offset=next_offset') and implies a read-only retrieval via 'Retrieve'. However, it doesn't describe the overall response shape, empty results, or any operational limits beyond pagination.

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

Conciseness5/5

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

The description is three short, purposeful sentences: purpose, use case, and pagination. It is front-loaded and contains no filler or redundant restatement of the tool name.

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 read-only metadata listing tool with a fully documented schema, the description covers purpose, when-to-use, and pagination. The absence of an output schema makes the has_more/next_offset note valuable, though the exact return structure is still not fully spelled out.

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?

All six parameters already have descriptions in the schema, so the baseline is 3. The description adds useful pagination meaning to offset and connects the field enum to hosts/sourcetypes/sources, but it does not substantially enrich the other parameter semantics beyond what the schema provides.

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?

The description opens with a clear verb-object pair ('Retrieve distinct metadata values for a given index') and specifies the three value types (hosts, sourcetypes, sources). This provides a concrete resource and scope. It does not explicitly name or contrast a sibling tool, so it does not fully earn the top score for 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 Guidelines4/5

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

'Use this when you need hosts, sourcetypes, or sources in an index' gives an explicit triggering condition. It does not explicitly list when not to use alternatives or name alternatives, but the guidance is clear enough for an agent to recognize the intended scenario.

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