← All procedures

handle.list

The open handles of the caller: the objects with a state that its procedures opened

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

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/sqlite/register"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["handle","list"], {});
console.log(JSON.stringify(result));

From the command line

$ mark handle list

As data, in a program

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

Input

FieldTypeRequiredDefaultDescription
kindstringnoOnly the objects of this kind

Output

FieldTypeRequiredDefaultDescription
handlesobject[]yesThe open objects of the caller, in the order of their open
countnumberyesThe count of the handles in the list
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "kind": {
        "description": "Only the objects of this kind",
        "type": "string"
      }
    }
  },
  "output": {
    "type": "object",
    "properties": {
      "handles": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "handle": {
              "type": "string",
              "description": "The id of the handle"
            },
            "kind": {
              "type": "string",
              "description": "The kind of the object, for example \"sqlite.Database\""
            },
            "label": {
              "description": "A short text that tells the object apart, for example the path of a file",
              "type": "string"
            },
            "openedAt": {
              "type": "number",
              "description": "The time of the open, in milliseconds since the epoch"
            },
            "usedAt": {
              "type": "number",
              "description": "The time of the last use (the open, or the last get), in milliseconds since the epoch"
            }
          },
          "required": [
            "handle",
            "kind",
            "openedAt",
            "usedAt"
          ],
          "additionalProperties": false
        },
        "description": "The open objects of the caller, in the order of their open"
      },
      "count": {
        "type": "number",
        "description": "The count of the handles in the list"
      }
    },
    "required": [
      "handles",
      "count"
    ],
    "additionalProperties": false
  }
}