Skip to main content
Glama
andymillar84-cyber

mcp-cliniko

delete_patient

Archive a patient record using their unique ID to remove them from active practice management.

Instructions

Delete (archive) a patient

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patient_idYesPatient ID

Implementation Reference

  • Registration of the 'delete_patient' tool via server.tool(). Registers the tool name, description, input schema, and handler.
    // Delete (archive) patient
    server.tool('delete_patient', {
      description: 'Delete (archive) a patient',
      inputSchema: {
        type: 'object',
        properties: {
          patient_id: { type: 'number', description: 'Patient ID' }
        },
        required: ['patient_id']
      },
    }, async ({ patient_id }: { patient_id: number }) => {
      try {
        await client.deletePatient(patient_id);
        return {
          content: [{
            type: 'text',
            text: `Patient ${patient_id} has been archived successfully`
          }]
        };
      } catch (error) {
        throw new Error(`Failed to delete patient: ${error instanceof Error ? error.message : 'Unknown error'}`);
      }
    });
  • Handler function that receives patient_id, calls client.deletePatient(), and returns a success message. On failure, throws an error.
    }, async ({ patient_id }: { patient_id: number }) => {
      try {
        await client.deletePatient(patient_id);
        return {
          content: [{
            type: 'text',
            text: `Patient ${patient_id} has been archived successfully`
          }]
        };
      } catch (error) {
        throw new Error(`Failed to delete patient: ${error instanceof Error ? error.message : 'Unknown error'}`);
      }
    });
  • Input schema for delete_patient: requires a 'patient_id' (number).
    description: 'Delete (archive) a patient',
    inputSchema: {
      type: 'object',
      properties: {
        patient_id: { type: 'number', description: 'Patient ID' }
      },
      required: ['patient_id']
    },
  • Helper method in ClinikoClient that sends a DELETE request to /patients/{id} to archive the patient.
    async deletePatient(id: number): Promise<void> {
      return this.request<void>(`/patients/${id}`, {
        method: 'DELETE',
      });
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description indicates that the deletion is actually an archival action ('archive'), which is a behavioral trait. However, it does not disclose side effects, permissions needed, or impact on related data. Without annotations, more transparency would be beneficial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise, front-loaded, and contains no unnecessary words. Every part earns its place for a simple delete operation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool with no output schema, the description provides essential information about the action. It could mention permanence or reversibility, but overall it is adequately complete given the tool's simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema fully describes the only parameter (patient_id) with a description 'Patient ID'. The description adds no additional meaning beyond the schema, so baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action 'Delete' and resource 'patient', with the parenthetical '(archive)' adding nuance. It distinctively identifies the tool among siblings as the only patient deletion tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like update_patient or delete_appointment. There is no mention of prerequisites, when not to use, or context such as irreversible actions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/andymillar84-cyber/mcp-cliniko'

If you have feedback or need assistance with the MCP directory API, please join our Discord server