Skip to main content
Glama
deslicer

MCP Server for Splunk

get_metadata

Retrieve distinct metadata values for Splunk indexes to discover available hosts, sourcetypes, or sources within a specified time window, aiding targeted query construction and data validation.

Instructions

Retrieve distinct metadata values for a given index to aid query construction. Use this tool when you need to discover which hosts, sourcetypes, or sources are present in an index within a recent time window. This is useful for building targeted searches or validating data availability. Results are constrained by your Splunk permissions.

Args: index (str): Target index to inspect (e.g., 'main', 'security') field (str, optional): Metadata field to list values for. One of 'host', 'sourcetype', or 'source' (default: 'host') earliest_time (str, optional): Search start time (e.g., '-24h@h') (default: '-24h@h') latest_time (str, optional): Search end time (e.g., 'now') (default: 'now') limit (int, optional): Maximum number of distinct values to return (default: 100)

Response Format: Returns a dictionary with 'status' and 'data' containing:

  • field: Requested field name

  • index: Target index

  • values: Array of distinct values (up to 'limit')

  • count: Number of values returned

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYes
fieldNohost
earliest_timeNo-24h@h
latest_timeNonow
limitNo
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the tool's behavior: it retrieves distinct metadata values, is constrained by permissions, and returns results in a specific format. However, it doesn't mention potential limitations like performance impacts or error handling, leaving some gaps in behavioral context.

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 well-structured and front-loaded with the core purpose, followed by usage guidelines, parameter details, and response format. Every sentence adds value without redundancy, and the information is organized logically for easy comprehension, making it highly efficient.

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?

Given the tool's complexity (5 parameters, no annotations, no output schema), the description is complete. It covers purpose, usage, all parameters with semantics, and the response format in detail. This provides sufficient context for an AI agent to understand and invoke the tool correctly without relying on external documentation.

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?

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains each parameter's purpose (e.g., 'Target index to inspect', 'Metadata field to list values for'), provides examples (e.g., 'main', 'security', '-24h@h'), and clarifies defaults and constraints (e.g., 'One of 'host', 'sourcetype', or 'source''). This fully compensates for the lack of schema descriptions.

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?

The description clearly states the tool's purpose with specific verbs ('retrieve distinct metadata values') and resources ('for a given index'), and distinguishes it from siblings by specifying its unique function of discovering hosts, sourcetypes, or sources in an index. It explicitly mentions aiding query construction and validating data availability, which differentiates it from general search or listing tools.

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?

The description provides explicit guidance on when to use this tool ('when you need to discover which hosts, sourcetypes, or sources are present in an index within a recent time window') and its purpose ('useful for building targeted searches or validating data availability'). It also mentions constraints ('Results are constrained by your Splunk permissions'), giving clear context for usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/deslicer/mcp-for-splunk'

If you have feedback or need assistance with the MCP directory API, please join our Discord server