Skip to main content
Glama
andymillar84-cyber

mcp-cliniko

get_available_times

Retrieve open appointment slots for a practitioner within a specified date range using business and practitioner IDs.

Instructions

Get available appointment times for a practitioner

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
business_idYesBusiness ID
practitioner_idYesPractitioner ID
fromYesStart date for availability check (YYYY-MM-DD)
toYesEnd date for availability check (YYYY-MM-DD)

Implementation Reference

  • Main handler that registers the 'get_available_times' MCP tool. It accepts business_id, practitioner_id, from, and to parameters, calls the Cliniko client's getAvailableTimes method, and returns the available times as JSON.
    server.tool('get_available_times', {
      description: 'Get available appointment times for a practitioner',
      inputSchema: {
        type: 'object',
        properties: {
          business_id: { type: 'number', description: 'Business ID' },
          practitioner_id: { type: 'number', description: 'Practitioner ID' },
          from: { type: 'string', description: 'Start date for availability check (YYYY-MM-DD)' },
          to: { type: 'string', description: 'End date for availability check (YYYY-MM-DD)' }
        },
        required: ['business_id', 'practitioner_id', 'from', 'to']
      },
    }, async (params: z.infer<typeof AvailableTimesSchema>) => {
      try {
        const availableTimes = await client.getAvailableTimes(params);
        return {
          content: [{
            type: 'text',
            text: JSON.stringify({
              available_times: availableTimes,
              total: availableTimes.length,
              ...params
            }, null, 2)
          }]
        };
      } catch (error) {
        throw new Error(`Failed to get available times: ${error instanceof Error ? error.message : 'Unknown error'}`);
      }
    });
  • Zod schema for validating input parameters (business_id, practitioner_id, from, to).
    const AvailableTimesSchema = z.object({
      business_id: z.number().describe('Business ID'),
      practitioner_id: z.number().describe('Practitioner ID'),
      from: z.string().describe('Start date for availability check (YYYY-MM-DD)'),
      to: z.string().describe('End date for availability check (YYYY-MM-DD)'),
    });
  • Helper method on ClinikoClient that makes the HTTP request to the Cliniko API's /available_times endpoint with query parameters and returns the available times array.
    async getAvailableTimes(params: {
      business_id: number;
      practitioner_id: number;
      from: string;
      to: string;
    }): Promise<AvailableTime[]> {
      const searchParams = new URLSearchParams({
        business_id: params.business_id.toString(),
        practitioner_id: params.practitioner_id.toString(),
        from: params.from,
        to: params.to,
      });
      
      const response = await this.request<{ available_times: AvailableTime[] }>(`/available_times?${searchParams.toString()}`);
      return response.available_times;
    }
  • The registration function that registers all appointment-related tools on the MCP server. The 'get_available_times' tool is registered within this function via server.tool().
    export function registerAppointmentTools(server: any, client: ClinikoClient) {
Behavior2/5

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

No annotations are present, so the description bears full responsibility. It discloses no behavioral traits such as side effects (none expected from a 'get' operation), return format, or any constraints. The single sentence provides minimal behavioral context.

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 one short, front-loaded sentence with no wasted words. It efficiently conveys the core action and resource, appropriate for this simple tool.

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

Completeness2/5

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

Given the 4 required parameters, no output schema, and numerous sibling tools, the description is incomplete. It does not explain what the output represents (e.g., list of time slots) or how to interpret results, limiting its standalone usefulness.

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 has 100% parameter description coverage, so the foundation is adequate. The description does not add any additional meaning beyond what the schema already provides; thus, it meets the baseline without extra value.

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

Purpose4/5

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

The description states a specific verb ('Get') and resource ('available appointment times'), which is clear. However, it does not differentiate from sibling tools like 'list_appointments' that also deal with appointments, leaving some ambiguity about the distinct purpose.

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 (e.g., 'list_appointments' for existing appointments, 'create_appointment' after finding times). There are no prerequisites or context cues for usage.

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