← All procedures

procedure.list

List the registered procedures

MCPCLIbrowser
Package
@procedures/client · README
Path
["procedure","list"]
CLI
mark procedure list
MCP tool
procedure.list on the dev-tools server
As data
{"$proc":["procedure","list"],"input":{}}
Tags
core, meta

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(["procedure","list"], {});
console.log(JSON.stringify(result));

From the command line

$ mark procedure list

As data, in a program

{ "$proc": ["procedure", "list"], "input": {} }

Input

FieldTypeRequiredDefaultDescription
namespacestringnoOnly the procedures under this first path segment
includeMetadatabooleannoGive the whole metadata of each procedure
runtimebooleannoOnly the procedures that procedure.define made

Output

FieldTypeRequiredDefaultDescription
proceduresobject[]yesThe procedures, in the order of the registry
countnumberyesThe number of procedures
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "namespace": {
        "description": "Only the procedures under this first path segment",
        "type": "string"
      },
      "includeMetadata": {
        "description": "Give the whole metadata of each procedure",
        "type": "boolean"
      },
      "runtime": {
        "description": "Only the procedures that procedure.define made",
        "type": "boolean"
      }
    }
  },
  "output": {
    "type": "object",
    "properties": {
      "procedures": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "path": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "The path of the procedure"
            },
            "key": {
              "type": "string",
              "description": "The path as a dotted key"
            },
            "description": {
              "description": "The description of the metadata",
              "type": "string"
            },
            "tags": {
              "description": "The tags of the metadata",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "hasHandler": {
              "type": "boolean",
              "description": "True when the procedure has a handler (it can run)"
            },
            "runtime": {
              "type": "boolean",
              "description": "True for a procedure that procedure.define made"
            },
            "metadata": {
              "description": "The whole metadata"
            }
          },
          "required": [
            "path",
            "key",
            "hasHandler",
            "runtime"
          ],
          "additionalProperties": {}
        },
        "description": "The procedures, in the order of the registry"
      },
      "count": {
        "type": "number",
        "description": "The number of procedures"
      }
    },
    "required": [
      "procedures",
      "count"
    ],
    "additionalProperties": {}
  }
}