9 tools registered. Strongest in tool selection, weakest in trust.
// document.modelContext is the canonical entry point - the navigator.modelContext alias is deprecated.
document.modelContext.registerTool({ /* ... */ });search_posts, get_post, get_menu, get_site_info, get_categories{
name: "search_posts",
// Declare readOnlyHint: true on tools that truly have no side effects -
// that is the claim that lets an agent relax confirmation on reads.
// (false is the default, so declaring it adds no information.)
annotations: { readOnlyHint: true }
}{
"name": "search_posts",
"description": "Search posts, pages or custom post types on the site.",
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Search keywords."
},
"post_type": {
"type": "string",
"description": "Post type slug (default: any)."
},
"per_page": {
"type": "integer",
"description": "Results per page (default: 5, max: 20)."
}
},
"required": [
"query"
]
},
"annotations": {}
}readability: weak; obstruction: weak// Make the tool's effect visible on the page the person is looking at:
// update the same UI your existing human flow uses when your_tool_name runs,
// so the person co-browsing sees what the agent just did.
execute: async (args, { signal }) => {
const result = await performAction(args, signal);
renderResultInPage(result); // the human-visible half of the same action
return result;
}retrieve: registered at 1387ms// Register tools as soon as they're ready, not behind a deferred/async chunk.
document.modelContext.registerTool({ /* ... */ });// document.modelContext is the canonical entry point - the navigator.modelContext alias is deprecated.
document.modelContext.registerTool({ /* ... */ });get_site_info: inputSchema.properties is not an object{
name: "get_site_info",
inputSchema: { type: "object", properties: { /* ... */ }, required: [] }
}get_post: weak; get_menu: weaksearch_posts, get_post, get_menu, get_site_info, get_categories{
name: "search_posts",
// Declare readOnlyHint: true on tools that truly have no side effects -
// that is the claim that lets an agent relax confirmation on reads.
// (false is the default, so declaring it adds no information.)
annotations: { readOnlyHint: true }
}get_markdown_content: description instructs agent on ideal consumption; get_llms_txt: description instructs agent to understand site at a glance; retrieve: description instructs agent to use this before another tool{
name: "get_markdown_content",
// Metadata DESCRIBES the tool - it never addresses the agent reading it.
// Rewrite any name, description, title, or schema field description that
// instructs the agent (which tool to prefer, what to output, rules to
// ignore) so it states what the tool does and what it returns instead.
description: "Searches the catalog and returns matching items with prices."
}{
"query": "posts"
}{
"id": 1
}{
"form_id": 1,
"fields": {}
}