client.or
Short-circuit OR (returns first truthy or last value)
MCPCLIbrowser- Package
- @procedures/client · README
- Path
["client","or"]- CLI
mark client or --values <any[]>- MCP tool
client.oron thedev-toolsserver- As data
{"$proc":["client","or"],"input":{}}- Tags
- core, logic, runs-refs
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","or"], { values: [] });
console.log(JSON.stringify(result));From the command line
$ mark client or --values <any[]>
As data, in a program
{ "$proc": ["client", "or"], "input": { "values": [] } }Input
| Field | Type | Required |
|---|---|---|
values | unknown[] | yes |
Output
The schema does not list fields (any).
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"values": {
"type": "array",
"items": {},
"description": "The operands, in order: values or calls. The evaluation stops at the deciding value."
}
},
"required": [
"values"
],
"additionalProperties": {}
},
"output": {
"description": "The first truthy operand value, or the last value"
}
}