Skip to main content
Glama

Read one saved object's query and filters

malcolm_saved_object_detail
Read-only

Reads one saved object with its query, filters, and index pattern resolved, so you can recover a curated query or find the search behind a visualization.

Instructions

Read one saved object with its query, filters and index pattern already resolved.

    Use this on a saved SEARCH to recover the query a human curated —
    Malcolm ships over a hundred of them, and the Arkime-side equivalent is
    arkime_views — and on a visualization to find the search it is built
    from. malcolm_saved_objects lists the catalogue and stops there;
    malcolm_dashboard_export resolves DASHBOARD ids only and answers 200
    with an embedded 404 for a visualization or saved-search id, so for
    those two this is the only route. For the traffic a query matches, take
    the string to malcolm_search or search_dsl.

    Three indirections are followed here instead of being handed back: the
    query sits in kibanaSavedObjectMeta.searchSourceJSON as a JSON *string*
    needing a second parse, the index is a reference NAME that means nothing
    until it is looked up in the object's own references[] array, and the
    query itself is stored in two shapes — some saved searches use the
    pre-7.x {"query_string": {"query": "..."}} object rather than a plain
    string. `query` is always the string.

    Field names, and which of them appear for which object type, are in the
    output schema. Read `language` before reusing `query`: "lucene" and
    "kuery" are not interchangeable. On Malcolm's training instance the
    index-pattern reference id is the pattern itself ("arkime_sessions3-*");
    it can also be a UUID, which this tool resolves with
    object_type="index-pattern".
    A visualization has no query of its own — `based_on_search` names the
    saved search it inherits one from — and the aggregation and panel-layout
    blobs behind a dashboard come from malcolm_dashboard_export. Raises if
    nothing has that type and id.
    

Input Schema

NameRequiredDescriptionDefault
object_idYesThe object's id as malcolm_saved_objects returns it, e.g. "bc940221-83d5-416e-a353-dc8fc2f84141". Ids are not unique across types, so object_type has to match.
object_typeNoThe object's type, one of: search (a curated query, the usual case), visualization, dashboard, index-pattern. A right id with the wrong type reads upstream as no such object.search

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.1
    • changedOutput schema / $defs / SavedObjectDetail / description
      Previous value: -"One saved object with its query resolved. `columns`/`sort` exist on a\nsaved search only; `based_on_search` on a visualization only. Aggregation\n(visState) and panel (panelsJSON) blobs are deliberately absent.\n\n`query` is always a string, which upstream's is not: on one v26.07.1\ninstall, 25 of its 141 saved searches store the pre-7.x shape\n{\"query_string\": {\"query\": \"event.dataset:x509\", ...}} instead. See\n_query_text."New value: +"One saved object with its query resolved. `columns`/`sort` exist on a\nsaved search only; `based_on_search` on a visualization only. Aggregation\n(visState) and panel (panelsJSON) blobs are deliberately absent.\n\n`query` is always a string, which upstream's is not: some of Malcolm's\nsaved searches store the pre-7.x shape\n{\"query_string\": {\"query\": \"event.dataset:x509\", ...}} instead. See\n_query_text."
  2. Addedv1.0.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations cover safety (readOnly, non-destructive, openWorld) but the description adds the hard part: three indirections are followed (searchSourceJSON is a JSON string needing a second parse, index is a reference name resolved via references[], query is stored in two shapes). It also warns that `language` must be read before reusing `query`, and states failure mode ('Raises if nothing has that type and id'). This is rich behavioral context beyond annotations.

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-loads the one-line purpose, then routes to siblings, then details the indirections. It is longer than strictly necessary for a 2-param read tool, but each paragraph carries distinct load-bearing information (routing, indirections, language warning, failure mode). Mild verbosity for the payoff.

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?

An output schema exists, so return-value detail is unnecessary, and the description correctly says field names and their type-dependence are in the output schema. Combined with sibling routing, indirection disclosure, language warning, and failure condition, nothing an agent needs to call this correctly is missing.

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 100%, so both parameters are already documented there. The description reinforces object_type semantics (the index-pattern UUID case with object_type="index-pattern") and that ids are not unique across types, but adds only marginal detail beyond the schema.

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 (read) and resource (one saved object) and explicitly scopes what is resolved: query, filters, index pattern. It distinguishes itself from malcolm_saved_objects (catalogue only) and malcolm_dashboard_export (dashboard ids only), so the agent can select it without opening the 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?

Gives explicit when-to-use: saved SEARCH to recover a curated query, visualization to find its source search. Names when-not/alternatives: malcolm_saved_objects for the catalogue, malcolm_dashboard_export for dashboards, malcolm_search/search_dsl for matching traffic. Routing is unambiguous.

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