评价产品
rate_product【需要登录】给某产品打 1–5 星 + 可选文字评价(一人一产品一条,再次调用即编辑)。不能评价自己的产品。先用 get_product / search_products 拿 productId。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | 文字评价,可选 | |
| score | Yes | 星级 1–5 | |
| productId | Yes | 产品 id |
rate_product【需要登录】给某产品打 1–5 星 + 可选文字评价(一人一产品一条,再次调用即编辑)。不能评价自己的产品。先用 get_product / search_products 拿 productId。
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | 文字评价,可选 | |
| score | Yes | 星级 1–5 | |
| productId | Yes | 产品 id |
Changes observed during successful MCP inspections.
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already flag this as a non-read-only, idempotent, open-world write. The description adds genuinely new context: login is required, one rating per user per product, a repeat call edits rather than duplicates, and self-ratings are rejected. That materially extends what the annotations convey without contradicting them.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two compact sentences with the login precondition front-loaded and no filler. Slightly dense with bracketed constraints, but every clause carries information an agent needs.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a three-parameter mutation with annotations present and no output schema, the description covers auth, cardinality, upsert behavior, and ID acquisition, which is close to sufficient. Only the response behavior after rating (e.g., whether the summary updates) is left unaddressed, which the absent output schema makes tolerable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so productId, score, and body are already documented in the schema. The description only restates those same facts ('1–5 星 + 可选文字评价') and adds no format, length, or content guidance beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description gives a specific verb ('打 1–5 星' / rate) and resource (某产品 / a product), and pairs it with the optional text review. It is clearly distinguishable from siblings like get_product_ratings, delete_my_rating, or get_product_rating_summary.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It states a concrete prerequisite and names the tools that produce it ('先用 get_product / search_products 拿 productId'), and it explains re-invocation semantics and the self-rating prohibition. It does not explicitly route against alternatives such as delete_my_rating or update_my_product, so it stops short of a full when/when-not map.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.