← All procedures
client.chain
Execute procedures sequentially
MCPCLIbrowser- Package
- @procedures/client · README
- Path
["client","chain"]- CLI
mark client chain --steps <any[]>- MCP tool
client.chain on the dev-tools server- As data
{"$proc":["client","chain"],"input":{}}- Tags
- core, control-flow, runs-refs
Try it in the Composer →
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","chain"], { steps: [] });
console.log(JSON.stringify(result));From the command line
$ mark client chain --steps <any[]>
As data, in a program
{ "$proc": ["client", "chain"], "input": { "steps": [] } }Input
| Field | Type | Required |
|---|
steps | unknown[] | yes |
passThrough | boolean | no |
initialInput | unknown | no |
Output
| Field | Type | Required | Default | Description |
|---|
results | any[] | yes | | The result of each step, in order |
final | any | no | | The result of the last step |
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"steps": {
"type": "array",
"items": {},
"description": "The steps, in order: calls or values. A step can read an earlier result as { $ref: name } or { $ref: \"$last\" }."
},
"passThrough": {
"description": "Give each step that has no input the result of the step before",
"type": "boolean"
},
"initialInput": {
"description": "The input of the first step when passThrough is true"
}
},
"required": [
"steps"
],
"additionalProperties": {}
},
"output": {
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {},
"description": "The result of each step, in order"
},
"final": {
"description": "The result of the last step"
}
},
"required": [
"results"
],
"additionalProperties": {}
}
}