AI MOOC
✦ Grow togetherInvite 3 friends, earn 1 month of membership · Up to 12 monthsInvite friends →

Library / My reading notes

Give tools bounded permissions and record facts

Specify parameters, results and allowed states for each tool.

Back to course plan: Design an AI workflow that can stop and recover

Chapter 2 / 3 · Read and take notes

Specify parameters, results and allowed states for each tool.

Understand the method

A tool contract defines capability, input and evidence of the result. save_draft stores a draft and returns its identifier and status; it does not have sending permission. Task identifiers must be checked against the current user’s access rather than accepted blindly.

Store a proposed action separately from execution facts. planned means intended, running means executing, and succeeded requires a receipt. unknown after a timeout requires a status lookup. Log necessary identifiers and errors without credentials, full customer records or private contacts.

  1. 1Check access
  2. 2Record intent
  3. 3Call tool
  4. 4Verify result

Included material

Rehearsal contract: save_draft({taskId, text, idempotencyKey}) → {draftId, status}. A key binds to the same task and content; do not reuse it for changed content.

Work through the steps

  1. Write contracts for read_feedback, classify and save_draft.
  2. Record a plan before each call and update it from the receipt.
  3. Rehearse a repeated save with the same key and verify one logical draft.

Worked example

taskId: feedback-week-01
operation: save_draft
idempotencyKey: feedback-week-01-draft-v1
state: planned → running → succeeded
receipt: {draftId: "rehearsal-draft-01", status: "saved"}
Mode: MANUAL REHEARSAL, not a live tool receipt.

Your exercise

If a paragraph changes, should you keep the v1 idempotency key? Write the new version record and explain why.

Check before delivery

  • The tool contract does not implicitly grant sending or deletion.
  • Rehearsal results are clearly distinct from live receipts.
Finish the exercise, then view the reference

Changed content needs a v2 operation with a new key and a relation to v1. Reusing a key with different content should conflict rather than silently overwrite.

An original course with teaching exercises. Reading records, practice outcomes and independent certification are distinct.

References and further reading

The lessons are original. The following sources are provided under their respective permissions.

Course

AI Agents for Beginners

Microsoft · en/zh

MIT

License checked. This entry links to the original; the book text is not mirrored.

License checked: 2026-10-16 · Pinned 6c3a5e13
Article / guide

Building Effective Agents

Anthropic · en

Original link; commercial republication permission not verified

Original link only; full text is not mirrored.

License checked: 2026-10-16
Whitepaper / report

NIST AI 600-1: Generative AI Profile

NIST / Autio et al. · en

NIST Technical Series reprint policy

Original PDF provided under the institution’s reprint policy.

License checked: 2026-10-16