Skip to main content
Glama

volkern_create_cotizacion

Generate a new quotation with line items, validity period, and notes for leads or deals in the CRM system.

Instructions

Create a new quotation/quote

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
leadIdNoAssociated lead ID
dealIdNoAssociated deal ID
validezDiasNoValidity period in days (default: 30)
notasNoNotes or terms
itemsYesLine items for the quote

Implementation Reference

  • Handler for volkern_create_cotizacion: Makes a POST request to /cotizaciones endpoint with the provided arguments to create a new quotation
    case "volkern_create_cotizacion":
      return volkernRequest("/cotizaciones", "POST", args);
  • Schema definition for volkern_create_cotizacion tool: Defines input parameters including leadId, dealId, validezDias, notas, and an items array with concepto, cantidad, precioUnitario, and descuento fields
    {
      name: "volkern_create_cotizacion",
      description: "Create a new quotation/quote",
      inputSchema: {
        type: "object",
        properties: {
          leadId: { type: "string", description: "Associated lead ID" },
          dealId: { type: "string", description: "Associated deal ID" },
          validezDias: { type: "number", description: "Validity period in days (default: 30)" },
          notas: { type: "string", description: "Notes or terms" },
          items: {
            type: "array",
            items: {
              type: "object",
              properties: {
                concepto: { type: "string", description: "Item description" },
                cantidad: { type: "number" },
                precioUnitario: { type: "number" },
                descuento: { type: "number", description: "Discount percentage" }
              },
              required: ["concepto", "cantidad", "precioUnitario"]
            },
            description: "Line items for the quote"
          }
        },
        required: ["items"]
      }
  • volkernRequest helper function: Handles HTTP requests to the Volkern API with authentication, method specification, and error handling
    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();
    }
  • handleToolCall function signature: The main dispatcher function that routes tool calls to their specific handlers via a switch statement
    async function handleToolCall(
      name: string,
      args: Record<string, unknown>
    ): Promise<unknown> {
  • src/index.ts:961-986 (registration)
    Server request handler registration: Sets up the CallToolRequestSchema handler that invokes handleToolCall for all tool execution requests
    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}`,
            },
          ],
          isError: true,
        };
      }
    });

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