Skip to main content
Glama

Set a prompt's FAQ answer

set_prompt_answer
DestructiveIdempotent

Set the FAQ answer of one tracked prompt (the same answer the dashboard's FAQ editor saves and the site's FAQPage JSON-LD carries). The answer is stored as sent, except that CRLF/CR line endings become LF and the ends are trimmed; an empty answer clears it. More than 600 characters (Unicode code points) is refused — { ok: false, reason: "invalid", field: "answer", max: 600 } — and never cut. source is your own label for the write (≤100 characters, e.g. a release tag), kept in the answer's change history. expectedHash (optional) is the answerHash you last read, or null for "no answer": when the stored answer's hash differs, nothing is saved and the result is { ok: false, reason: "conflict", currentHash } — so a stale copy cannot overwrite a newer answer; without expectedHash the write replaces whatever is stored. Returns { ok: true, queryId, answerHash, updatedAt, changed }: answerHash is the lowercase hex SHA-256 of the stored answer's UTF-8 bytes (null when cleared); sending the text already stored returns the same answerHash with changed: false and records nothing. queryId comes from list_prompts; an unknown or archived prompt is refused with reason unknown-query. Many answers at once is sync_prompt_answers.

Input Schema

NameRequiredDescriptionDefault
answerYesThe FAQ answer (≤600 characters); an empty string clears it.
siteIdNoOptional on a connected app: the site chosen with select_site is used. If given, it must be that site. With an API key it is required: a site id from list_sites.
sourceNoOptional label for this write (≤100 characters), e.g. "ci:release-4.2".
queryIdYesA tracked prompt's queryId, from list_prompts.
expectedHashNoOptional: the answerHash you last read (null = you expect no answer). If the stored answer differs, nothing is saved (reason conflict).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the annotations: it discloses normalization (CRLF/CR to LF, trimming), that empty clears, that over-600-code-point answers are refused rather than truncated, the exact refusal payload, and that source is retained in change history. Concurrency semantics for expectedHash and the conflict payload are spelled out, and the idempotency claim in the annotations is corroborated with "sending the text already stored returns the same answerHash with changed: false and records nothing." The destructiveHint is also substantiated by "without expectedHash the write replaces whatever is stored."

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?

Purpose and the batch alternative are front-loaded, and nearly every clause carries operational information (limits, error shapes, hash semantics). The cost is density: the body is one long run-on paragraph mixing parameter rules, failure payloads, and return fields, which would read better as short labeled segments.

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?

For a mutating single-record write with no output schema, the description supplies everything an agent needs: input sourcing, normalization and length rules, optimistic-concurrency behavior, the full success and failure payload shapes, and the batch alternative. Nothing material is left to inference.

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 100%, so the schema already documents all five parameters; the description nevertheless adds meaning beyond it, notably that the 600 limit counts Unicode code points, that refusal (not truncation) is the failure mode, that source lives in the answer's change history, and how expectedHash interacts with the stored hash. siteId is not discussed in the description at all, leaving the connected-app versus API-key requirement entirely to 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?

Opens with a specific verb and resource ("Set the FAQ answer of one tracked prompt") and anchors it to two concrete surfaces the agent may already know (the dashboard FAQ editor and the FAQPage JSON-LD). It explicitly contrasts single-write behavior with the batch sibling sync_prompt_answers, so the tool is distinguishable without reading any schema.

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?

Gives clear routing guidance: queryId comes from list_prompts, and "Many answers at once is sync_prompt_answers" names the alternative and the condition that selects it. It also explains when expectedHash should be supplied (the hash you last read, or null for no answer) versus omitting it. It never states an explicit when-not-to-use case beyond the unknown/archived prompt refusal, so it falls short of a 5.

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.