Tool tree
Why the id that keeps React's DOM in sync with your data is the same identity a WebMCP agent needs to edit that data safely, measured against Chrome's native document.modelContext.
Implementation
gradeNot graded
gradeNot graded
list-itemsAnswer
List every item on the packing list in display order. Each entry has a stable `id` (use it to refer to the item in other tools) and its current `index` (changes whenever the list changes).
View tool JSON
{
"name": "list-items",
"kind": "answer",
"impl": "imperative",
"description": "List every item on the packing list in display order. Each entry has a stable `id` (use it to refer to the item in other tools) and its current `index` (changes whenever the list changes).",
"inputSchema": {
"type": "object",
"properties": {}
}
}add-itemAction
Add an item to the packing list and return its new id.
View tool JSON
{
"name": "add-item",
"kind": "act",
"impl": "imperative",
"description": "Add an item to the packing list and return its new id.",
"inputSchema": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "What to pack, e.g. 'Bear spray'."
},
"position": {
"type": "string",
"enum": [
"top",
"bottom"
],
"description": "Where to insert it. Defaults to bottom."
}
},
"required": [
"text"
]
}
}remove-itemAction
Remove an item from the packing list by id.
View tool JSON
{
"name": "remove-item",
"kind": "act",
"impl": "imperative",
"description": "Remove an item from the packing list by id.",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The item's id, as returned by list-items or add-item."
}
},
"required": [
"id"
]
}
}move-itemAction
Move an item to a new position in the list.
View tool JSON
{
"name": "move-item",
"kind": "act",
"impl": "imperative",
"description": "Move an item to a new position in the list.",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The item's id, as returned by list-items or add-item."
},
"index": {
"type": "number",
"description": "Zero-based position to move the item to. 0 is the top."
}
},
"required": [
"id",
"index"
]
}
}rename-itemAction
Change an item's text. The item keeps its id.
View tool JSON
{
"name": "rename-item",
"kind": "act",
"impl": "imperative",
"description": "Change an item's text. The item keeps its id.",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The item's id, as returned by list-items or add-item."
},
"text": {
"type": "string",
"description": "The new text."
}
},
"required": [
"id",
"text"
]
}
}