{"ok":true,"site":{"host":"d34dman.github.io","url":"https://d34dman.github.io/sutram/","type":"live","desc":"One set of commands for your web app: people type them in a console, AI agents call them as WebMCP tools or from JavaScript. Every part of the app registers its commands the same way. Open source,…","tools":[{"name":"sutram_status","kind":"answer","impl":"imperative","description":"Run every provider's status command and return what each reports about the page. Call this first; later, name only the providers you need. Returns { data: { providers: [{ provider, code, text?, data? }] } }.","title":"Report on the page","annotations":{"readOnlyHint":true,"untrustedContentHint":true},"inputSchema":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"string"},"description":"Only these providers, such as [\"form\", \"page\"]. Leave it out for all"}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/sutram/","pages":["/sutram/","/sutram/example/forms.html"]},{"name":"sutram_batch","kind":"act","impl":"imperative","description":"Run several tools in order as one change. Every call is checked before any runs. When a call needs the user's approval, the user is asked once, before anything runs. The batch stops at the first call that fails, and providers that support it undo the earlier calls. Use it for edits that belong together. Returns { code, results, completed, total }; with quiet, { code, completed, total } and the failed call's result as failed.","title":"Run several tools as one change","annotations":{"untrustedContentHint":true},"inputSchema":{"type":"object","properties":{"calls":{"type":"array","description":"The calls, in order","items":{"type":"object","properties":{"tool":{"type":"string","description":"A tool name from this page"},"input":{"type":"object","description":"The tool's arguments"}},"required":["tool"]}},"quiet":{"type":"boolean","description":"Leave out the results of the calls that worked: return only a count, and the result of the call that failed"}},"required":["calls"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/sutram/","pages":["/sutram/","/sutram/example/forms.html"]},{"name":"events_list","kind":"answer","impl":"imperative","description":"List the events providers on this page have declared. Returns { events: [{ name, description }] }.","title":"List declared events","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/sutram/","pages":["/sutram/","/sutram/example/forms.html"]},{"name":"events_recent","kind":"act","impl":"imperative","description":"Show recent events on this page, optionally only those after an event id. Returns { events: [{ id, name, payload, source }], cursor }.","title":"Show recent events","annotations":{"readOnlyHint":true,"untrustedContentHint":true},"inputSchema":{"type":"object","properties":{"since":{"type":"integer","minimum":0,"default":0,"description":"Only events with a higher id than this"}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/sutram/","pages":["/sutram/","/sutram/example/forms.html"]},{"name":"events_wait","kind":"act","impl":"imperative","description":"Wait until an event happens and return it, instead of asking events recent again and again. Returns at once when the page already keeps a matching event after --since. Returns { event: { id, name, payload, source }, cursor }.","title":"Wait for an event","annotations":{"readOnlyHint":true,"untrustedContentHint":true},"inputSchema":{"type":"object","properties":{"name":{"type":"string","description":"The event to wait for, such as message.shown. Leave it out to take any event"},"since":{"type":"integer","minimum":0,"description":"Only events with a higher id than this, including ones already kept. Leave it out to wait for the next one"},"timeout":{"type":"integer","minimum":1,"maximum":60,"default":10,"description":"Seconds to wait before giving up"}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/sutram/","pages":["/sutram/","/sutram/example/forms.html"]},{"name":"shop_list","kind":"answer","impl":"imperative","description":"List the products for sale. Returns { products: [{ sku, name, price: money }] }. money: an amount in euros.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/sutram/","pages":["/sutram/"]},{"name":"shop_find","kind":"answer","impl":"imperative","description":"Find products whose name contains all the words. Returns { products: [{ sku, name, price: money }] }. money: an amount in euros.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"query":{"type":"string","description":"Words to look for"}},"required":["query"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/sutram/","pages":["/sutram/"]},{"name":"cart_status","kind":"answer","impl":"imperative","description":"Show what is in the cart. Returns { count, total: money, items: [{ sku, name, qty, price: money }] }. money: an amount in euros.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/sutram/","pages":["/sutram/"]},{"name":"cart_add","kind":"act","impl":"imperative","description":"Add a product to the cart. Returns { count, total: money }. money: an amount in euros.","annotations":{},"inputSchema":{"type":"object","properties":{"sku":{"type":"string","enum":["V60-02","KALITA-185","GUJI-250","FILTERS-02","SCALE"],"description":"A product code, as in shop list"},"qty":{"type":"integer","minimum":1,"maximum":20,"default":1,"description":"How many"}},"required":["sku"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/sutram/","pages":["/sutram/"]},{"name":"cart_remove","kind":"act","impl":"imperative","description":"Remove a product from the cart. Returns { count, total: money }. money: an amount in euros.","annotations":{},"inputSchema":{"type":"object","properties":{"sku":{"type":"string","enum":["V60-02","KALITA-185","GUJI-250","FILTERS-02","SCALE"],"description":"A product code, as in shop list"}},"required":["sku"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/sutram/","pages":["/sutram/"]}],"category":"Developer Tools","favicon":"/favicons/d34dman.github.io.svg","apiSurface":"spec","toolCount":10}}