Skip to main content
Glama

set_prompt_answer

DestructiveIdempotent

Submit or withdraw a book as an answer to a Hardcover community prompt, optionally explaining why it fits. Find prompt and book IDs with get_prompts and search_books.

Instructions

Answer a community prompt with a book (answered=true, optionally with a description of why it fits) or withdraw that answer (answered=false). Idempotent: if you already answered the prompt with that book, nothing changes and the existing description is kept. Changes take a few seconds to show, so don't repeat a call immediately. You can answer one prompt with several different books. Returns prompt_id, book_id, answered, 'changed', and answer_id. Find prompt ids with get_prompts and book ids with search_books.

Input Schema

NameRequiredDescriptionDefault
book_idYesHardcover book ID.
answeredYestrue to submit the book, false to withdraw it.
prompt_idYesHardcover prompt ID (use get_prompts to find IDs).
descriptionNoWhy this book fits the prompt (optional; when adding).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare write/idempotent/destructive/open-world, but the description adds semantics beyond them: idempotency means the existing description is preserved, not overwritten, and there is a propagation delay of a few seconds before changes appear. It also enumerates the returned fields in the absence of an output schema.

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 core operation is front-loaded in sentence one, then idempotency, timing, cardinality, and return fields follow in order of usefulness. Four sentences, no filler, no repetition of the title.

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 4-parameter mutation tool with no output schema, the description covers the mode switch, idempotency, latency, cardinality, return payload, and how to source the two ids. Nothing an agent needs to invoke it correctly is missing.

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 baseline is 3, but the description goes slightly further by explaining the behavioral meaning of answered (submit vs withdraw) and by tying description to the add path only ('optionally with a description of why it fits'). It does not add format or constraint 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 and resource pair — answer/withdraw a book on a community prompt — and names the two modes (answered=true/false) in the first sentence. It is clearly distinguishable from read-oriented siblings like get_prompts and search_books, which it references rather than duplicates.

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?

Explicitly explains the when: true to submit, false to withdraw, optional description only when adding. It also gives the when-not ('don't repeat a call immediately') and the alternatives for obtaining inputs (get_prompts for prompt ids, search_books for book ids), plus the allowance to attach several books to one prompt.

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