Skip to main content
Glama

Update a saved query

saved_queries_update

Change a saved query: its name, query, platforms, schedule, limits, volume alert (alertThreshold, null to remove it), webhook endpoint, briefing, noise presets, platformSearches (null to search every platform as planned), sentiment or insights (null to turn them off) (only the fields given), or pause or resume it with status. A new query wording is saved as a new version; matches already stored keep the version that found them.

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": {
      "id": "<id>",
      "context": "<context>",
      "llm_model": "<llm_model>"
    },
    "name": "saved_queries_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe saved query's id.
nameNoA name for the query, shown in the dashboard and in alerts.
briefNo
noiseNoKinds of post its runs leave out: `jobs` (job ads and job seekers' posts), `giveaways` (giveaway and contest entry posts), `crypto-spam` (crypto promotion and money scams). Checked on each post after it's found, so a run costs the same. Empty, the default, leaves everything in.
queryNoThe Boolean query. Check it for free first with POST /v1/query/validate.
statusNoPause or resume it. Resuming a `capped` or `broken` query tries again.
syntaxNoSyntax the query is written in: `native` (Social Fetch's Boolean language), or another tool's to import: `x` (X search), `onclusive`, `talkwalker`, `brandwatch` (also Cision Social Listening) or `meltwater`.
contextYesDescribe the user's underlying goal in one sentence, not the tool you are calling.
briefingNoA briefing on what it found: `daily` covers the day before (UTC) and comes at 08:00 UTC; `weekly` covers Monday to Sunday and comes on Monday at 08:00 UTC. It counts the posts, the change on the period before, the stories, each platform's posts, the loudest voices and the 5 most engaged posts, is shown on the query in the Listening app, and is sent to its webhook endpoint as the `saved_query.briefing` event. Only for an active query that ran in the period without failing. Null for none, the default.
insightsNo
llm_modelYesThe exact model identifier you (the assistant) are running as, taken from your system prompt or environment (for example "claude-opus-4-8" or "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" and do not guess.
platformsNoPlatforms to search. Empty means every platform search covers.
sentimentNoGive each new match a sentiment estimate (positive, neutral or negative), for 1 credit per 10 matches given one, on top of each run's maxCreditsPerRun but within monthlyCreditCap when one is set. Only matches given one are charged. A match keeps its sentiment: it's never estimated or charged again. Default false.
alertThresholdNoA volume alert: when a run brings the posts it found in the trailing `window` to at least `posts`, it sends the `saved_query.threshold` webhook event, at most once a window. The first run of a query or of a new wording doesn't alert (it finds the backlog). Null for none.
cadenceMinutesNoMinutes between scheduled runs, from 15 to 10080 (a week).
conversation_idNoEcho the conversation_id from the server's previous response. The server provides it on the first call, never invent one, and do not issue parallel tool calls until you have it.
maxCreditsPerRunNoThe most one run may charge, held while it runs as with POST /v1/query/search; what isn't used is given back.
monthlyCreditCapNoThe most all its runs may charge in a calendar month (UTC). Null for no cap beyond each run's.
platformSearchesNo
webhookEndpointIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / brief
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "What a relevant match is, in your own words (up to 500 characters), such as \"People asking which project management tool to use for a small team. Not job ads or template sellers.\" Each run's new matches are judged against it by AI: relevant or not, with a short reason (`judgement` on each match). Free: a run judges up to 10 new matches for every credit it charges, and keeps any beyond that unjudged. Matches judged not relevant are still kept and returned; filter with `judgement`. A match keeps its judgement when the brief changes. Null or absent for none.",
      +      "maxLength": 500,
      +      "minLength": 10,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / platformSearches / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "description": "Searches each run makes on a platform instead of those planned from the query, by platform (`platformSearches` on `POST /v1/query/search`). Null for none: every platform searched as planned.",
      -    "properties": {
      -      "hackernews": {
      -        "description": "Searches to run on this platform instead of those planned from the query, in its own syntax (Instagram: hashtags, with or without `#`). Posts found are still checked against the whole query.",
      -        "items": {
      -          "maxLength": 200,
      -          "minLength": 1,
      -          "type": "string"
      -        },
      -        "maxItems": 10,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "instagram": {
      -        "description": "Searches to run on this platform instead of those planned from the query, in its own syntax (Instagram: hashtags, with or without `#`). Posts found are still checked against the whole query.",
      -        "items": {
      -          "maxLength": 200,
      -          "minLength": 1,
      -          "type": "string"
      -        },
      -        "maxItems": 10,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "linkedin": {
      -        "description": "Searches to run on this platform instead of those planned from the query, in its own syntax (Instagram: hashtags, with or without `#`). Posts found are still checked against the whole query.",
      -        "items": {
      -          "maxLength": 200,
      -          "minLength": 1,
      -          "type": "string"
      -        },
      -        "maxItems": 10,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "reddit": {
      -        "description": "Searches to run on this platform instead of those planned from the query, in its own syntax (Instagram: hashtags, with or without `#`). Posts found are still checked against the whole query.",
      -        "items": {
      -          "maxLength": 200,
      -          "minLength": 1,
      -          "type": "string"
      -        },
      -        "maxItems": 10,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "threads": {
      -        "description": "Searches to run on this platform instead of those planned from the query, in its own syntax (Instagram: hashtags, with or without `#`). Posts found are still checked against the whole query.",
      -        "items": {
      -          "maxLength": 200,
      -          "minLength": 1,
      -          "type": "string"
      -        },
      -        "maxItems": 10,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "tiktok": {
      -        "description": "Searches to run on this platform instead of those planned from the query, in its own syntax (Instagram: hashtags, with or without `#`). Posts found are still checked against the whole query.",
      -        "items": {
      -          "maxLength": 200,
      -          "minLength": 1,
      -          "type": "string"
      -        },
      -        "maxItems": 10,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "twitter": {
      -        "description": "Searches to run on this platform instead of those planned from the query, in its own syntax (Instagram: hashtags, with or without `#`). Posts found are still checked against the whole query.",
      -        "items": {
      -          "maxLength": 200,
      -          "minLength": 1,
      -          "type": "string"
      -        },
      -        "maxItems": 10,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "youtube": {
      -        "description": "Searches to run on this platform instead of those planned from the query, in its own syntax (Instagram: hashtags, with or without `#`). Posts found are still checked against the whole query.",
      -        "items": {
      -          "maxLength": 200,
      -          "minLength": 1,
      -          "type": "string"
      -        },
      -        "maxItems": 10,
      -        "minItems": 1,
      -        "type": "array"
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "description": "Searches each run makes on a platform instead of those planned from the query, by platform (`platformSearches` on `POST /v1/query/search`). Null for none: every platform searched as planned.",
      +    "properties": {
      +      "hackernews": {
      +        "description": "Searches for this platform, in its own syntax (Instagram: hashtags).",
      +        "items": {
      +          "maxLength": 200,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "maxItems": 10,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "instagram": {
      +        "description": "Searches for this platform, in its own syntax (Instagram: hashtags).",
      +        "items": {
      +          "maxLength": 200,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "maxItems": 10,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "linkedin": {
      +        "description": "Searches for this platform, in its own syntax (Instagram: hashtags).",
      +        "items": {
      +          "maxLength": 200,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "maxItems": 10,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "reddit": {
      +        "description": "Searches for this platform, in its own syntax (Instagram: hashtags).",
      +        "items": {
      +          "maxLength": 200,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "maxItems": 10,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "threads": {
      +        "description": "Searches for this platform, in its own syntax (Instagram: hashtags).",
      +        "items": {
      +          "maxLength": 200,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "maxItems": 10,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "tiktok": {
      +        "description": "Searches for this platform, in its own syntax (Instagram: hashtags).",
      +        "items": {
      +          "maxLength": 200,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "maxItems": 10,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "twitter": {
      +        "description": "Searches for this platform, in its own syntax (Instagram: hashtags).",
      +        "items": {
      +          "maxLength": 200,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "maxItems": 10,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "youtube": {
      +        "description": "Searches for this platform, in its own syntax (Instagram: hashtags).",
      +        "items": {
      +          "maxLength": 200,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "maxItems": 10,
      +        "minItems": 1,
      +        "type": "array"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / platforms / items / description
      Previous value: -"A platform a search runs on: `twitter` (X), `reddit`, `youtube`, `tiktok`, `linkedin`, `instagram` (searched by hashtag, so only posts that use the hashtag are found), `threads` (searched by plain words, one short page a search, so it can miss posts) or `hackernews` (stories and comments). More platforms follow."New value: +"A platform to search: `twitter` (X), `reddit`, `youtube`, `tiktok`, `linkedin`, `instagram` (hashtags only), `threads` (one short page, so it can miss posts) or `hackernews`."
  3. Added

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and non-idempotent, so the safety profile is covered. The description adds genuinely useful behavior absent from annotations: a new query wording becomes a new version while already-stored matches keep the version that found them. It does not explain the non-idempotent implication (re-issuing the same call spawns another version) or describe the response.

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 verb and resource, and every clause carries meaning. The stacked parentheticals in '(null to turn them off) (only the fields given)' make the long first sentence harder to parse than necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 20-parameter mutation tool with no output schema, the definition covers versioning, null-removal and partial-update semantics well, but says nothing about what the call returns or what state changes on success. Annotations carry the destructive/read-only profile, so the remaining gap is the response contract.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 80%, so the baseline is 3; the description earns a point by grouping the many fields into recognizable categories (schedule, limits, volume alert, webhook endpoint, briefing, noise, platformSearches) and restating the null-removal contract for alertThreshold, platformSearches, sentiment and insights. It adds no detail on the required id/context/llm_model parameters, but the schema documents those.

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 and resource ('Change a saved query') and enumerates the mutable surface — name, query, platforms, schedule, limits, volume alert, webhook endpoint, briefing, noise, platformSearches, sentiment, insights, status. An agent can immediately tell this apart from saved_queries_create, saved_queries_get, or saved_queries_run.

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?

'Only the fields given' establishes partial-update semantics, and repeated 'null to remove it'/'null to turn them off' clauses tell the agent how to clear settings rather than update them. What is missing is any explicit exclusion, e.g. directing users to saved_queries_create for new queries or saved_queries_run for execution.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.