Skip to main content
Glama

volkern_create_contrato_from_cotizacion

Generate a contract from an accepted quotation by specifying payment method, dates, and additional terms. This tool converts quotations into formal agreements within the CRM system.

Instructions

Create a contract from an accepted quotation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cotizacionIdYesThe accepted quotation's ID
fechaInicioNoContract start date
fechaFinNoContract end date
metodoPagoNo
clausulasNoAdditional contract terms

Implementation Reference

  • Handler for volkern_create_contrato_from_cotizacion tool. Extracts cotizacionId from args and makes a POST request to /contratos/from-cotizacion/{cotizacionId} with the remaining contract data.
    case "volkern_create_contrato_from_cotizacion": {
      const { cotizacionId, ...contratoData } = args;
      return volkernRequest(`/contratos/from-cotizacion/${cotizacionId}`, "POST", contratoData);
    }
  • Input schema definition for volkern_create_contrato_from_cotizacion tool. Defines properties: cotizacionId (required), fechaInicio, fechaFin, metodoPago (enum), and clausulas.
    {
      name: "volkern_create_contrato_from_cotizacion",
      description: "Create a contract from an accepted quotation",
      inputSchema: {
        type: "object",
        properties: {
          cotizacionId: { type: "string", description: "The accepted quotation's ID" },
          fechaInicio: { type: "string", description: "Contract start date" },
          fechaFin: { type: "string", description: "Contract end date" },
          metodoPago: { type: "string", enum: ["unico", "mensual", "trimestral", "anual"] },
          clausulas: { type: "string", description: "Additional contract terms" }
        },
        required: ["cotizacionId"]
      }
    },
  • The volkernRequest helper function that handles all API calls to the Volkern API. Used by the handler to make HTTP requests with proper authentication headers.
    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();
    }

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