Publish a tool of a registered kind (e.g. python, http or echo; the kind argument's enum lists them all) under this tenant's namespace. Call host.quickstart(kind) first for a filled-in example spec and the full publish-to-call sequence. Python's sandbox API: import mcphost (mcphost.table, mcphost.state, mcphost.docs). Name must match ^[a-z][a-z0-9_]{1,40}$; a rejection names the failing field and a corrected example. Try host.tool_test before a real call.
View input schema
{
"type": "object",
"properties": {
"dry_run": {
"description": "return the diff this call would make and commit nothing",
"type": "boolean"
},
"force": {
"description": "Publish a chain whose mapping can never resolve (verdict will_fail) anyway; the response's gates entry then carries forced: true. Default false.",
"type": "boolean"
},
"kind": {
"description": "Which registered kind to publish under: one of this field's `enum` (host.quickstart with no kind lists every kind, alias and recipe). A job-word alias in the enum also resolves here -- webhook-style words for an inbound webhook, cron-style words for a timed run -- both resolve to kind http and the descriptor comes back with resolved_from naming the alias you asked for. Error contract per kind: chain (families: compose, tool_state, chain_spec; source_line: no); echo (families: none; source_line: no); http (families: upstream, http_call; source_line: no); jq (families: tool_code, tool_limit; source_line: no); js (families: tool_code, tool_limit, upstream, compose, tool_state, js_spec; source_line: yes); python (families: tool_code, tool_limit, upstream, compose, tool_state, python_call; source_line: yes); wasm (families: tool_code, tool_limit; source_line: no).",
"enum": [
"chain",
"echo",
"http",
"jq",
"js",
"python",
"wasm",
"event",
"events",
"webhook",
"webhooks",
"inbound",
"trigger",
"inbox",
"cron",
"schedule",
"scheduled",
"doc",
"docs",
"document",
"documents",
"message",
"messages",
"msg",
"database",
"db",
"table",
"tables",
"csv",
"sql",
"schedules",
"uptime",
"probe",
"probes",
"memory",
"memories"
],
"type": "string"
},
"name": {
"description": "Local name for the new tool; must match ^[a-z][a-z0-9_]{1,40}$.",
"pattern": "^[a-z][a-z0-9_]{1,40}$",
"type": "string"
},
"scopes": {
"description": "OAuth scopes a token must carry (directly, or via mcp) to reach this tool: catalogued names from host.oauth.scopes, or the built-ins read/write. At most 8. Omit (or [] ) to require only mcp -- unaffected by any catalog.",
"items": {
"type": "string"
},
"type": "array"
},
"spec": {
"description": "The kind-specific spec object; see host.quickstart(kind) for a filled-in example. For python's network field: \"none\" (every plan), \"public\" (requires the pro plan), \"egress\" (requires the pro plan) -- a tool's own code reaches this tenant's data with `import mcphost` (mcphost.table, mcphost.state, mcphost.docs, mcphost.lineage) even when network is \"none\".",
"type": "object"
},
"tags": {
"description": "Catalog tags: at most 16, each 1-32 chars of a-z, 0-9 and '-', stored lower-case and deduped.",
"items": {
"type": "string"
},
"type": "array"
},
"tenant_key": {
"description": "The key `signup` returned. Optional on the connection that ran signup (or host.redeem): that connection is already bound to the tenant it created, so later calls on it need no tenant_key. On a connection with no Authorization: Bearer header and no prior signup, omitting it implicitly signs that connection up as a brand-new tenant and runs this call as it -- see host.whoami's source field. When both a header and this argument are present, the header wins.",
"type": "string"
},
"visibility": {
"description": "Who may find the tool (default private). unlisted: callable by full name and readable by host.catalog.get, never listed. public: listed in the catalog, and refused (untested_tool_cannot_be_public) unless the current version passes its dry run first. Use host.tool_share for group or url.",
"enum": [
"private",
"unlisted",
"public"
],
"type": "string"
}
},
"required": [
"name",
"kind",
"spec"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"kind": {
"const": "chain"
}
},
"required": [
"kind"
]
},
"then": {
"properties": {
"spec": {
"additionalProperties": false,
"properties": {
"description": {
"description": "the tool's description in `tools/list` (every kind)"
},
"outputs": {
"description": "fields a caller can rely on in `result.payload`, optionally with a `$.a.b` path each (every kind)"
},
"reads": {
"description": "tables this tool reads, recorded for lineage and blast-radius reports"
},
"steps": {},
"ui": {
"additionalProperties": false,
"description": "Optional presentation hints. `form: true` gives a url-shared tool a /f/ page where a person fills in the arguments and the submission lands in your inbox.",
"properties": {
"form": {
"type": "boolean"
},
"submit_label": {
"maxLength": 40,
"type": "string"
},
"success_text": {
"maxLength": 200,
"type": "string"
}
},
"type": "object"
}
},
"required": [
"steps"
],
"type": "object"
}
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "echo"
}
},
"required": [
"kind"
]
},
"then": {
"properties": {
"spec": {
"additionalProperties": false,
"properties": {
"description": {
"description": "the tool's description in `tools/list` (every kind)"
},
"outputs": {
"description": "fields a caller can rely on in `result.payload`, optionally with a `$.a.b` path each (every kind)"
},
"reads": {
"description": "tables this tool reads, recorded for lineage and blast-radius reports"
},
"schema": {},
"ui": {
"additionalProperties": false,
"description": "Optional presentation hints. `form: true` gives a url-shared tool a /f/ page where a person fills in the arguments and the submission lands in your inbox.",
"properties": {
"form": {
"type": "boolean"
},
"submit_label": {
"maxLength": 40,
"type": "string"
},
"success_text": {
"maxLength": 200,
"type": "string"
}
},
"type": "object"
}
},
"required": [
"schema"
],
"type": "object"
}
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "http"
}
},
"required": [
"kind"
]
},
"then": {
"properties": {
"spec": {
"additionalProperties": false,
"properties": {
"args_schema": {},
"body": {},
"description": {
"description": "the tool's description in `tools/list` (every kind)"
},
"headers": {},
"method": {},
"outputs": {
"description": "fields a caller can rely on in `result.payload`, optionally with a `$.a.b` path each (every kind)"
},
"query": {},
"reads": {
"description": "tables this tool reads, recorded for lineage and blast-radius reports"
},
"response": {},
"timeout_s": {},
"ui": {
"additionalProperties": false,
"description": "Optional presentation hints. `form: true` gives a url-shared tool a /f/ page where a person fills in the arguments and the submission lands in your inbox.",
"properties": {
"form": {
"type": "boolean"
},
"submit_label": {
"maxLength": 40,
"type": "string"
},
"success_text": {
"maxLength": 200,
"type": "string"
}
},
"type": "object"
},
"upstream": {},
"upstream_provider": {},
"url": {}
},
"type": "object"
}
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "jq"
}
},
"required": [
"kind"
]
},
"then": {
"properties": {
"spec": {
"additionalProperties": false,
"properties": {
"args_schema": {},
"description": {
"description": "the tool's description in `tools/list` (every kind)"
},
"max_output_bytes": {},
"outputs": {
"description": "fields a caller can rely on in `result.payload`, optionally with a `$.a.b` path each (every kind)"
},
"program": {},
"reads": {
"description": "tables this tool reads, recorded for lineage and blast-radius reports"
},
"timeout_s": {},
"ui": {
"additionalProperties": false,
"description": "Optional presentation hints. `form: true` gives a url-shared tool a /f/ page where a person fills in the arguments and the submission lands in your inbox.",
"properties": {
"form": {
"type": "boolean"
},
"submit_label": {
"maxLength": 40,
"type": "string"
},
"success_text": {
"maxLength": 200,
"type": "string"
}
},
"type": "object"
}
},
"required": [
"program"
],
"type": "object"
}
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "js"
}
},
"required": [
"kind"
]
},
"then": {
"properties": {
"spec": {
"additionalProperties": false,
"properties": {
"args_schema": {
"description": "a JSON Schema object"
},
"description": {
"description": "a string"
},
"env": {
"description": "a map of name to string value; names must match ^[A-Z][A-Z0-9_]{0,63}$"
},
"memory_mb": {
"description": "a positive integer number of megabytes"
},
"network": {
"description": "\"none\" (every plan), \"public\" (requires the pro plan), \"egress\" (requires the pro plan) -- a tool's own code reaches this tenant's data with `import mcphost` (mcphost.table, mcphost.state, mcphost.docs, mcphost.lineage) even when network is \"none\""
},
"outputs": {
"description": "a list of field names or an object mapping field names to path strings"
},
"reads": {
"description": "tables this tool reads, recorded for lineage and blast-radius reports"
},
"secrets": {
"description": "a list of strings"
},
"source": {
"description": "a string"
},
"timeout_s": {
"description": "a positive integer number of seconds"
},
"ui": {
"additionalProperties": false,
"description": "Optional presentation hints. `form: true` gives a url-shared tool a /f/ page where a person fills in the arguments and the submission lands in your inbox.",
"properties": {
"form": {
"type": "boolean"
},
"submit_label": {
"maxLength": 40,
"type": "string"
},
"success_text": {
"maxLength": 200,
"type": "string"
}
},
"type": "object"
}
},
"required": [
"source"
],
"type": "object"
}
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "python"
}
},
"required": [
"kind"
]
},
"then": {
"properties": {
"spec": {
"additionalProperties": false,
"properties": {
"args_schema": {
"description": "a JSON Schema object"
},
"description": {
"description": "a string"
},
"env": {
"description": "a map of name to string value; names must match ^[A-Z][A-Z0-9_]{0,63}$"
},
"memory_mb": {
"description": "a positive integer number of megabytes"
},
"network": {
"description": "\"none\" (every plan), \"public\" (requires the pro plan), \"egress\" (requires the pro plan) -- a tool's own code reaches this tenant's data with `import mcphost` (mcphost.table, mcphost.state, mcphost.docs, mcphost.lineage) even when network is \"none\""
},
"outputs": {
"description": "a list of field names or an object mapping field names to path strings"
},
"reads": {
"description": "tables this tool reads, recorded for lineage and blast-radius reports"
},
"requirements": {
"description": "a list of strings"
},
"secrets": {
"description": "a list of strings"
},
"source": {
"description": "a string"
},
"timeout_s": {
"description": "a positive integer number of seconds"
},
"ui": {
"additionalProperties": false,
"description": "Optional presentation hints. `form: true` gives a url-shared tool a /f/ page where a person fills in the arguments and the submission lands in your inbox.",
"properties": {
"form": {
"type": "boolean"
},
"submit_label": {
"maxLength": 40,
"type": "string"
},
"success_text": {
"maxLength": 200,
"type": "string"
}
},
"type": "object"
}
},
"required": [
"source"
],
"type": "object"
}
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "wasm"
}
},
"required": [
"kind"
]
},
"then": {
"properties": {
"spec": {
"additionalProperties": false,
"properties": {
"args_schema": {},
"component": {},
"description": {
"description": "the tool's description in `tools/list` (every kind)"
},
"memory_mb": {},
"outputs": {
"description": "fields a caller can rely on in `result.payload`, optionally with a `$.a.b` path each (every kind)"
},
"reads": {
"description": "tables this tool reads, recorded for lineage and blast-radius reports"
},
"timeout_s": {},
"ui": {
"additionalProperties": false,
"description": "Optional presentation hints. `form: true` gives a url-shared tool a /f/ page where a person fills in the arguments and the submission lands in your inbox.",
"properties": {
"form": {
"type": "boolean"
},
"submit_label": {
"maxLength": 40,
"type": "string"
},
"success_text": {
"maxLength": 200,
"type": "string"
}
},
"type": "object"
}
},
"required": [
"component"
],
"type": "object"
}
}
}
}
],
"x-deprecated": {
"replaced_by": "host.tool.publish",
"sunset": "2026-12-31"
}
}