← All procedures
mongo.database.ping
Health check and connectivity test
MCPCLI- Package
- @procedures/mongo · README
- Path
["mongo","database","ping"]- CLI
mark mongo database ping- MCP tool
mongo.database.ping on the dev-tools server- As data
{"$proc":["mongo","database","ping"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/mongo"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["mongo","database","ping"], {});
console.log(JSON.stringify(result));From the command line
$ mark mongo database ping
As data, in a program
{ "$proc": ["mongo", "database", "ping"], "input": {} }Input
| Field | Type | Required | Default | Description |
|---|
collection | string | no | | The collection name. It takes the place of metadata.collection. |
database | string | no | | The database name (default: the database of the connection) |
Output
| Field | Type | Required | Default | Description |
|---|
ok | boolean | yes | | True when the server answered |
latencyMs | number | yes | | The time of the ping, in milliseconds |
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"collection": {
"description": "The collection name. It takes the place of metadata.collection.",
"type": "string",
"minLength": 1
},
"database": {
"description": "The database name (default: the database of the connection)",
"type": "string",
"minLength": 1
}
}
},
"output": {
"type": "object",
"properties": {
"ok": {
"type": "boolean",
"description": "True when the server answered"
},
"latencyMs": {
"type": "number",
"description": "The time of the ping, in milliseconds"
}
},
"required": [
"ok",
"latencyMs"
],
"additionalProperties": {}
}
}