Question 150
A user supplies a product name, but the update tool requires an opaque product ID. What should the assistant do?
- Use the first UUID found in memory.
- Remove the ID field from the request.
- Convert the name into a guessed ID.
- Resolve the product through a supported lookup before updating it.
Explanation
Correct Answer
D:Discovery supplies the authoritative identifier and allows ambiguity to be resolved before mutation. Names are descriptive search inputs, while opaque IDs address specific records. The lookup result must identify the intended product before it is passed to the mutation endpoint.
Incorrect Answers
A:An unrelated identifier may target another object.
B:Omission does not satisfy the update endpoint's target requirement.
C:Opaque identifiers cannot be reliably derived from display names.
Question 151
A tool returns the first page and a continuation cursor. The user requested all matching records. What is required?
- Repeat the first-page request without the cursor.
- Follow the cursor until completion or report a documented limit.
- Invent remaining records from the first page's pattern.
- Treat the page length as the total count.
Explanation
Correct Answer
B:A continuation token indicates that more results remain. Preserve both the cursor and the query conditions when requesting later pages, and report partial coverage if retrieval stops before the set is exhausted.
Incorrect Answers
A:This retrieves the same slice instead of advancing.
C:Patterns do not establish actual database entries.
D:A full page may indicate additional results rather than completeness.
Question 152
An API returns an opaque next_cursor. How should the caller use it?
- Replace it with the last record's display name.
- Pass the returned token unchanged with the compatible query.
- Reuse a cursor from another search.
- Increment its apparent numeric suffix.
Explanation
Correct Answer
B:Opaque cursors should be treated as service-issued state. Alteration can skip, repeat, or invalidate retrieval. Opaque tokens may encode server-side traversal state and are not arithmetic offsets. Modifying a token can invalidate pagination or disconnect it from the original query.
Incorrect Answers
A:A name is not necessarily a valid continuation token.
C:Cursors may be bound to the original query or snapshot.
D:The cursor's internal encoding is not a public arithmetic contract.
Question 153
A search tool caps output but returns no indication of truncation. What should its response add?
- A generic success status with no indication that the returned set is partial.
- Returned count, truncation status, and a supported continuation mechanism.
- Return a relevance score for each displayed result but omit whether additional matches were cut off.
- Return only the tool's execution time and a generic success flag.
Explanation
Correct Answer
B:The consumer needs to distinguish a complete set from a capped subset and know how to retrieve more. The consumer needs to distinguish a complete small result from the first portion of a larger one. A continuation contract makes omitted material recoverable instead of silently lost.
Incorrect Answers
A:Execution success does not tell the caller whether the result is complete.
C:Scores help order the visible matches. They do not tell the caller whether the result set is complete or how to retrieve its remainder.
D:A successful bounded search can still truncate its output. Timing and transport success do not communicate the completeness of the returned data.
Question 154
An MCP tool is annotated read-only. Does that annotation alone guarantee the implementation cannot change data?
- No tool can ever be safely read-only.
- Yes, annotations replace backend permissions.
- No; implementation and authorization controls must substantiate the claim.
- Yes, if its name begins with get.
Explanation
Correct Answer
C:Annotations describe intended behavior but do not enforce it. A client must evaluate the implementation and granted privileges before treating an operation as unable to modify state.
Incorrect Answers
A:A properly implemented and constrained read operation can be nonmutating.
B:Metadata does not enforce implementation behavior.
D:Naming conventions cannot guarantee side-effect safety.
Question 155
A cleanup tool permanently deletes objects. What should its definition make explicit?
- That deletion is equivalent to listing.
- Deletion scope, irreversibility, prerequisites, and required identifiers.
- That every caller is automatically authorized.
- Only that cleanup improves performance.
Explanation
Correct Answer
B:The caller must understand consequences and target selection before invoking a destructive capability. A model must understand that cleanup is a destructive action rather than an archive or preview. Backend checks still enforce the target scope and prerequisites described by the interface.
Incorrect Answers
A:This misrepresents a write as a read.
C:Authorization depends on the authenticated request and applicable policy.
D:A benefit statement omits the operation's irreversible effect.
Question 156
A bulk-update tool immediately changes every matching record. Users need to inspect the affected set first. What interface supports this?
- Provide a preview with a reviewable target set and a separately guarded commit.
- Return the affected set only after committing.
- Ask the model to estimate the affected set.
- Keep a single immediate-write operation and add a natural-language preview request to its description.
- Keep immediate mutation but promise to undo any record the user objects to after seeing the result, even when the update may be irreversible.
Explanation
Correct Answer
A:Separating discovery from execution enables informed approval and validation of the exact proposed scope. The preview should identify the set that the user can review. The commit path needs to handle changes between preview and execution so that approval is not silently applied to a different set.
Incorrect Answers
B:Post-action visibility cannot support prior review.
C:An estimate cannot substitute for authoritative selection.
D:A description cannot make the backend provide a separate nonmutating preview when the operation always writes.
E:Post-action compensation is not prior review and may be impossible. The requirement calls for inspecting the target set before committing changes.
Question 157
A tool changes amount from major units to minor units without changing its contract version. What risk results?
- Existing callers will automatically infer the new units from the unchanged field name.
- Every old request becomes syntactically invalid automatically.
- Old callers will send every amount twice because changing units necessarily changes the number of requests.
- Existing callers may submit values with the old interpretation.
Explanation
Correct Answer
D:A compatible-looking field can now represent a different amount. Schema evolution must communicate and validate changed semantics. A schema can remain syntactically compatible while its numeric meaning changes. Migration needs an explicit contract boundary or compatibility behavior for older callers.
Incorrect Answers
A:An unchanged name does not communicate the changed amount scale to existing integrations.
B:The same numeric type may still pass structural validation.
C:The incompatible change concerns the meaning of each numeric amount. It does not itself duplicate transport requests.
Question 158
A backend silently ignores unexpected request fields. Why might strict argument validation be preferable for consequential tools?
- It exposes misspelled or unsupported parameters before execution.
- It makes every numerical value factually correct.
- It removes the need for error handling.
- It guarantees the chosen target is authorized.
Explanation
Correct Answer
A:Silent ignoring can make callers believe a requested constraint was applied when it was not. Ignoring a misspelled field can cause a consequential call to proceed using an unintended default. Early rejection makes the mismatch visible before the backend changes data.
Incorrect Answers
B:Structural acceptance does not verify real-world values.
C:Validation failures still need a controlled response.
D:Schema validation alone does not establish access rights.
Question 159
An update API treats omitted fields as unchanged and null as clearing a value. What must the tool explain?
- That omitted fields are deleted automatically.
- That null always means unknown in every API.
- That all optional fields should be filled with null.
- The distinct semantics of omission and explicit null.
Explanation
Correct Answer
D:Conflating them can erase data when the user intended no change. The schema and description should preserve the difference. For a partial update, absent and null can represent different instructions even when both look like missing information. The client must preserve that distinction when assembling the mutation.
Incorrect Answers
A:That contradicts the stated update contract.
B:This endpoint explicitly uses null as a mutation instruction.
C:Doing so would clear values unnecessarily.
Question 160
A search tool paginates a fixed, unchanged dataset using an offset. It sorts only by relevance score, and many rows tie. Repeated calls return tied rows in different orders, causing skipped and repeated rows across pages. Which contract change directly addresses this problem?
- Increase the page size without changing the ordering rule.
- Deduplicate each page independently before returning it.
- Include the total result count while leaving score ties unordered.
- Add a stable unique secondary sort key to define a total ordering of tied results.
Explanation
Correct Answer
D:With a fixed dataset, a deterministic tie-breaker keeps every row at the same position across page requests. This fixes order instability without relying on a larger page or post hoc duplicate removal.
Incorrect Answers
A:Larger pages may reduce the number of boundaries but still leave unstable ties at those boundaries. The contract does not ensure a reproducible partition of results.
B:A duplicate can occur on a different page, and a skipped row cannot be recovered by removing duplicates. Local cleanup does not define a stable global order.
C:The count tells the caller how many rows exist but not which rows belong on each page. It cannot stabilize the offset boundaries.