← All procedures

procedure.get

Describe a procedure by path or key

MCPCLIbrowser
Package
@procedures/client · README
Path
["procedure","get"]
CLI
mark procedure get --path <string[] | string>
MCP tool
procedure.get on the dev-tools server
As data
{"$proc":["procedure","get"],"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","get"], { path: "<path>" });
console.log(JSON.stringify(result));

From the command line

$ mark procedure get --path <string[] | string>

As data, in a program

{ "$proc": ["procedure", "get"], "input": { "path": "<path>" } }

Input

FieldTypeRequiredDefaultDescription
pathstring[] | stringyesThe path, as an array or a dotted key

Output

FieldTypeRequiredDefaultDescription
foundbooleanyesTrue when the registry has the procedure
pathstring[]noThe path of the procedure
keystringnoThe path as a dotted key
descriptionstringnoThe description of the metadata
tagsstring[]noThe tags of the metadata
hasHandlerbooleannoTrue when the procedure has a handler (it can run)
runtimebooleannoTrue for a procedure that procedure.define made
metadataanynoThe whole metadata
hasInputSchemabooleannoTrue when the procedure has an input schema
hasOutputSchemabooleannoTrue when the procedure has an output schema
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "path": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          {
            "type": "string"
          }
        ],
        "description": "The path, as an array or a dotted key"
      }
    },
    "required": [
      "path"
    ]
  },
  "output": {
    "type": "object",
    "properties": {
      "found": {
        "type": "boolean",
        "description": "True when the registry has the procedure"
      },
      "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"
      },
      "hasInputSchema": {
        "description": "True when the procedure has an input schema",
        "type": "boolean"
      },
      "hasOutputSchema": {
        "description": "True when the procedure has an output schema",
        "type": "boolean"
      }
    },
    "required": [
      "found"
    ],
    "additionalProperties": {}
  }
}