Skip to main content
Glama

Add or replace one of a keyword's sources

keyword_source_set
DestructiveIdempotent

Add a Source to a keyword, or replace one Source's searches, interval or enabled state, leaving every other Source untouched. Two calls. The first, with mode "estimate" and no estimateToken, writes nothing and returns the estimate of the change: monthlyCredits before and after, and resetSearches, the searches whose criteria change and whose next check starts from a fresh baseline without emitting what it finds. Show both to the person. The second, with mode "write", the same arguments and that estimateToken, writes it, and fails if the save started over a search the estimate did not announce. applied says which of the two happened: only applied=true is a save. Example, AI answers: source "ai_answers", refreshIntervalSeconds 604800, one search per prompt with overridesEnabled true and overrides {"filters": {"prompt": "...", "brands": ["YourBrand"], "engines": ["chatgpt", "gemini", "perplexity"]}}; switch coBrandsEnabled with keyword_update. Starts or changes polling that is charged per check at each Source's credit rate (AI answers per engine asked) until the keyword or the Source is paused. Call keyword_estimate first, show the person the monthlyCredits it returns, and send its estimateToken only after they agree.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesKeyword id, from list_keywords. Another account's id is a 404, never a 403.
modeYesestimate writes nothing and returns the price of this change with its estimateToken; it takes no estimateToken. write saves the change and requires the estimateToken of an estimate made with the same arguments.
sourceYes
enabledYesfalse switches the Source off and removes its checks; its searches stay stored. To stop it for a while, use keyword_source_manage instead.
searchesNoReplaces this Source's searches. Keep the id of each search you keep. Absent keeps the stored searches.
estimateTokenNomode "write" only, and required there: the estimateToken the mode "estimate" call returned for these same arguments. Valid 15 minutes.
refreshIntervalSecondsNoThis Source's own seconds between checks. null goes back to the keyword's refreshIntervalSeconds. Each Source has its own band: AI answers runs between 6 hours (21600) and 7 days (604800).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description goes well beyond them: it explains the two-phase commit (estimate writes nothing, write fails 'if the save started over a search the estimate did not announce'), cost implications ('charged per check at each Source's credit rate'), and the destructive semantics of enabled=false ('removes its checks; its searches stay stored'). No contradiction with 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?

The description is very long, but it is front-loaded with the core purpose and the critical estimate/write workflow before the per-source detail block. Each sentence carries real information for a complex tool; the density is justified, though the wall-of-text per-source section could be better broken up. Minor structural critique only.

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?

No output schema exists, yet the description explains return semantics explicitly: 'monthlyCredits before and after, and resetSearches' and 'applied says which of the two happened: only applied=true is a save.' It also covers the failure condition, cost, and per-source behavior. For a 7-parameter two-phase mutation tool, nothing an agent needs is missing.

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?

Despite 86% schema coverage, the description adds substantial value: it clarifies the mode enum semantics (estimate takes no token, write requires it), explains the searches replacement behavior ('Keep the id of each search you keep'), documents refreshIntervalSeconds bands, and provides an exhaustive per-source guide to overrides with a concrete ai_answers example. This far exceeds the baseline for high-coverage schemas.

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 precise verb pair (add/replace) with a specific resource (one of a keyword's sources) and an explicit scope constraint: 'leaving every other Source untouched.' The title and first sentence align, and the description clearly differentiates from siblings like keyword_source_manage and keyword_estimate by naming them and their distinct roles.

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?

Provides an explicit when-to-use protocol: 'Call keyword_estimate first, show the person the monthlyCredits it returns, and send its estimateToken only after they agree.' It also names exclusions and alternatives: 'To stop it for a while, use keyword_source_manage instead' and 'switch coBrandsEnabled with keyword_update.' The estimate-then-write sequence is unambiguous.

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.

Resources