client.throw
Throw an error
MCPCLIbrowser- Package
- @procedures/client · README
- Path
["client","throw"]- CLI
mark client throw --message <string>- MCP tool
client.throwon thedev-toolsserver- As data
{"$proc":["client","throw"],"input":{}}- Tags
- core, control-flow
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY, allCoreProcedures } from "@procedures/client";
for (const procedure of allCoreProcedures) {
if (!PROCEDURE_REGISTRY.has(procedure.path)) PROCEDURE_REGISTRY.register(procedure);
}
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["client","throw"], { message: "<message>" });
console.log(JSON.stringify(result));From the command line
$ mark client throw --message <string>
As data, in a program
{ "$proc": ["client", "throw"], "input": { "message": "<message>" } }Input
| Field | Type | Required |
|---|---|---|
message | string | yes |
code | string | no |
Output
The schema does not list fields (any).
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error message"
},
"code": {
"description": "The error code",
"type": "string"
}
},
"required": [
"message"
],
"additionalProperties": {}
},
"output": {
"not": {},
"description": "client.throw never gives a value: it throws"
}
}