Unregister Server
unregister_serverStop monitoring a server by providing its name. Removes the server from health checks and alerts.
Instructions
Remove a server from monitoring.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Implementation Reference
- src/registry.ts:164-167 (handler)Core handler: deletes the server from the SQLite database by name and returns a confirmation.
export function unregisterServer(name: string): { unregistered: true; name: string } { getDb().prepare('DELETE FROM servers WHERE name = ?').run(name); return { unregistered: true, name }; } - src/app.ts:728-741 (registration)Registration of the 'unregister_server' MCP tool with metadata and a handler lambda that delegates to unregisterServer().
server.registerTool( 'unregister_server', { title: 'Unregister Server', description: 'Remove a server from monitoring.', inputSchema: UnregisterSchema, annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: false } }, async (input: UnregisterInput) => formatResponse(unregisterServer(input.name)) ); - src/types.ts:69-71 (schema)Input schema for unregister_server: requires a 'name' string field.
export const UnregisterSchema = z.object({ name: z.string() }); - src/types.ts:129-129 (schema)TypeScript type inferred from UnregisterSchema for the unregister_server input.
export type UnregisterInput = z.infer<typeof UnregisterSchema>; - src/app.ts:7-22 (helper)Import statement pulling the unregisterServer function into app.ts where the tool is registered.
import { decodePatToken, getAzurePipeline, getDashboardReport, getLatestHealthCheck, getServer, getUptimeHistory, listAzurePipelineGroups, listAzurePipelines, listServers, recordHealthCheck, recordPipelineRun, registerAzurePipelines, registerServer, unregisterServer } from './registry.js';