get_server
Retrieve detailed information about a specific server by providing its ID. Access configuration, status, and other key data for effective server management.
Instructions
Get details of a specific server
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| server_id | Yes | The ID of the server |
Implementation Reference
- src/tools/servers.ts:29-39 (handler)The tool handler that calls client.getServer(server_id) and returns the server details as JSON.
async ({ server_id }) => { const serverInfo = await client.getServer(server_id); return { content: [ { type: "text" as const, text: JSON.stringify(serverInfo, null, 2), }, ], }; } - src/tools/servers.ts:23-40 (registration)Registration of the 'get_server' tool with MCP server, including name, description, and Zod schema for server_id.
server.tool( "get_server", "Get details of a specific server", { server_id: z.coerce.number().describe("The ID of the server"), }, async ({ server_id }) => { const serverInfo = await client.getServer(server_id); return { content: [ { type: "text" as const, text: JSON.stringify(serverInfo, null, 2), }, ], }; } ); - src/tools/servers.ts:26-28 (schema)Zod schema for the tool's input parameter: server_id (coerced number).
{ server_id: z.coerce.number().describe("The ID of the server"), }, - src/client.ts:115-121 (helper)The client helper method that makes the actual API call to GET /servers/{id}.
async getServer(id: number): Promise<Server> { const response = await this.request<ApiResponse<Server>>( "GET", `/servers/${id}` ); return response.data; } - src/tools/index.ts:7-11 (helper)Registration aggregator that calls registerServerTools, which registers the 'get_server' tool.
export function registerAllTools(server: McpServer, client: PloiClient) { registerServerTools(server, client); registerSiteTools(server, client); registerDatabaseTools(server, client); }