host.tool_publish
Publish a tool of a registered kind under this tenant's namespace. Minimal example spec per kind: echo -- spec: {"schema":{"properties":{"msg":{"type":"string"}},"required":["msg"],"type":"object"}}. spec.schema is any JSON Schema; a call echoes back the arguments it was given, validated against it. http -- spec: {"method":"GET","url":"https://api.example.com/items/{{id}}"}. url must be an absolute https URL; method and url are the only required fields -- args_schema is inferred from the url/header/body templates when omitted. python -- spec: {"source":"def main(args):\n return {"doubled": args["n"] * 2}\n"}. only source is required -- args_schema and requirements are both inferred from it (tool-infer, v0.4.0); source must define main(args). Name must match ^[a-z][a-z0-9_]{1,40}$. A rejection names the failing field, what was expected, and a corrected example -- fix it and resubmit. Try host.tool_test on a published tool before a real call, or call host.quickstart(kind) for a filled-in worked example.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| name | Yes | ||
| spec | Yes | ||
| tenant_key | No | The key `signup` returned. Required only when this connection carries no Authorization: Bearer header -- when both are present, the header wins. |