← All procedures

handle.close

Close a handle of the caller and its object, for example a database

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

From the command line

$ mark handle close --handle <string>

As data, in a program

{ "$proc": ["handle", "close"], "input": { "handle": "<handle>" } }

Input

FieldTypeRequiredDefaultDescription
handlestringyesThe id of the handle

Output

FieldTypeRequiredDefaultDescription
closedbooleanyesTrue when the handle was open and is now closed. False for a handle that is not open.
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "handle": {
        "type": "string",
        "minLength": 1,
        "description": "The id of the handle"
      }
    },
    "required": [
      "handle"
    ]
  },
  "output": {
    "type": "object",
    "properties": {
      "closed": {
        "type": "boolean",
        "description": "True when the handle was open and is now closed. False for a handle that is not open."
      }
    },
    "required": [
      "closed"
    ],
    "additionalProperties": false
  }
}