Skip to main content
Glama

volkern_cita_accion

Confirm, cancel, or reschedule appointments in Volkern CRM by specifying the appointment ID and desired action.

Instructions

Perform an action on an appointment (confirm, cancel, or reschedule)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
citaIdYesThe appointment's unique ID
accionYesAction to perform
nuevaFechaNoNew date/time for reschedule (ISO 8601)
motivoNoReason for cancellation

Implementation Reference

  • The handler case for 'volkern_cita_accion' that processes appointment actions by calling volkernRequest('/citas/accion', 'POST', args). This executes the tool logic by making a POST request to the Volkern API's /citas/accion endpoint.
    case "volkern_cita_accion":
      return volkernRequest("/citas/accion", "POST", args);
  • The volkernRequest helper function that performs the actual HTTP request to the Volkern API. It constructs the request with proper authentication (Bearer token), headers, and body, then handles the response and error cases.
    async function volkernRequest(
      endpoint: string,
      method: string = "GET",
      body?: Record<string, unknown>
    ): Promise<unknown> {
      const url = `${VOLKERN_API_URL}${endpoint}`;
      
      const options: RequestInit = {
        method,
        headers: {
          "Authorization": `Bearer ${VOLKERN_API_KEY}`,
          "Content-Type": "application/json",
        },
      };
    
      if (body && method !== "GET") {
        options.body = JSON.stringify(body);
      }
    
      const response = await fetch(url, options);
      
      if (!response.ok) {
        const errorData = await response.json().catch(() => ({}));
        throw new Error(
          `Volkern API Error (${response.status}): ${JSON.stringify(errorData)}`
        );
      }
    
      return response.json();
    }
  • Tool registration and schema definition for 'volkern_cita_accion'. Defines the tool name, description, and inputSchema with properties: citaId (required), accion (required, enum: confirmar/cancelar/reprogramar), nuevaFecha, and motivo.
    {
      name: "volkern_cita_accion",
      description: "Perform an action on an appointment (confirm, cancel, or reschedule)",
      inputSchema: {
        type: "object",
        properties: {
          citaId: { type: "string", description: "The appointment's unique ID" },
          accion: {
            type: "string",
            enum: ["confirmar", "cancelar", "reprogramar"],
            description: "Action to perform"
          },
          nuevaFecha: { type: "string", description: "New date/time for reschedule (ISO 8601)" },
          motivo: { type: "string", description: "Reason for cancellation" }
        },
        required: ["citaId", "accion"]
  • The handleToolCall function that routes all tool calls to their respective handlers using a switch statement. This is the main dispatcher that processes tool invocations and calls the appropriate logic for each tool.
    async function handleToolCall(
      name: string,
      args: Record<string, unknown>
    ): Promise<unknown> {
      switch (name) {
        // LEADS
        case "volkern_list_leads": {
          const params = new URLSearchParams();
          if (args.estado) params.append("estado", String(args.estado));
          if (args.canal) params.append("canal", String(args.canal));
          if (args.search) params.append("search", String(args.search));
          if (args.page) params.append("page", String(args.page));
          if (args.limit) params.append("limit", String(args.limit));
          return volkernRequest(`/leads?${params.toString()}`);
        }
        case "volkern_get_lead":
          return volkernRequest(`/leads/${args.leadId}`);
        case "volkern_create_lead":
          return volkernRequest("/leads", "POST", args);
        case "volkern_update_lead": {
          const { leadId, ...data } = args;
          return volkernRequest(`/leads/${leadId}`, "PATCH", data);
        }
    
        // APPOINTMENTS
        case "volkern_check_disponibilidad": {
          const params = new URLSearchParams();
          params.append("fecha", String(args.fecha));
          if (args.duracion) params.append("duracion", String(args.duracion));
          return volkernRequest(`/citas/disponibilidad?${params.toString()}`);
        }
        case "volkern_list_citas": {
          const params = new URLSearchParams();
          if (args.estado) params.append("estado", String(args.estado));
          if (args.tipo) params.append("tipo", String(args.tipo));
          if (args.fecha) params.append("fecha", String(args.fecha));
          if (args.fechaInicio) params.append("fechaInicio", String(args.fechaInicio));
          if (args.fechaFin) params.append("fechaFin", String(args.fechaFin));
          return volkernRequest(`/citas?${params.toString()}`);
        }
        case "volkern_create_cita":
          return volkernRequest("/citas", "POST", args);
        case "volkern_update_cita": {
          const { citaId, ...data } = args;
          return volkernRequest(`/citas/${citaId}`, "PATCH", data);
        }
        case "volkern_cita_accion":
          return volkernRequest("/citas/accion", "POST", args);
  • src/index.ts:961-980 (registration)
    The MCP server CallToolRequestSchema handler that receives tool call requests, extracts the tool name and arguments, invokes handleToolCall, and returns the formatted response or error message.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
    
      try {
        const result = await handleToolCall(name, args as Record<string, unknown>);
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        return {
          content: [
            {
              type: "text",
              text: `Error: ${errorMessage}`,
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the action types without behavioral details. It doesn't disclose whether these actions are reversible, require specific permissions, have side effects (e.g., notifications), or what happens on success/failure.

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 a single, efficient sentence that front-loads the core purpose. Every word earns its place with no redundancy or unnecessary elaboration.

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?

For a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns, error conditions, or important behavioral context (e.g., that 'nuevaFecha' is required only for 'reprogramar', 'motivo' might be optional for 'cancelar').

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?

Schema description coverage is 100%, so the schema fully documents all parameters. The description adds no additional parameter semantics beyond implying 'accion' has specific values, which is already covered by the enum in the schema. Baseline 3 is appropriate when schema does the heavy lifting.

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 clearly states the verb ('perform') and resource ('appointment'), and specifies the three possible actions (confirm, cancel, reschedule). However, it doesn't differentiate from sibling tools like 'volkern_update_cita' or 'volkern_list_citas', which could handle similar appointment operations.

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. For example, it doesn't clarify if this should be used instead of 'volkern_update_cita' for specific actions, or mention prerequisites like needing an existing appointment ID.

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/DeXpertmx/mcp-volkern'

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