Skip to main content
Glama

create_invoice_vat

Create a VAT rate for invoices by specifying its name and percentage.

Instructions

Create an invoice vat.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the invoice vat.
percentageYesNumber representing the VAT percentage.

Implementation Reference

  • The async handler function for the 'create_invoice_vat' tool. It receives the validated input body (name, percentage), calls apiPost to POST to '/invoice_vats', logs the response, and formats the result via formatCreate.
    async (body) => {
      try {
        const record = await apiPost<EduframeRecord>("/invoice_vats", body);
        void logResponse("create_invoice_vat", body, record);
        return formatCreate(record, "invoice vat");
      } catch (error) {
        return formatError(error);
      }
    },
  • Input schema for 'create_invoice_vat'. Requires 'name' (string) and 'percentage' (string representing VAT percentage).
    {
      description: "Create an invoice vat.",
      annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
      inputSchema: {
        name: z.string().describe("Name of the invoice vat."),
        percentage: z.string().describe("Number representing the VAT percentage."),
      },
    },
  • Registration of 'create_invoice_vat' via server.registerTool() with its name, metadata (description, annotations), schema, and handler.
    server.registerTool(
      "create_invoice_vat",
      {
        description: "Create an invoice vat.",
        annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
        inputSchema: {
          name: z.string().describe("Name of the invoice vat."),
          percentage: z.string().describe("Number representing the VAT percentage."),
        },
      },
      async (body) => {
        try {
          const record = await apiPost<EduframeRecord>("/invoice_vats", body);
          void logResponse("create_invoice_vat", body, record);
          return formatCreate(record, "invoice vat");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • The apiPost helper function used by the handler to make the POST request to the Eduframe API.
    export async function apiPost<T>(path: string, body: unknown): Promise<T> {
      const { token } = getConfig();
      const url = buildUrl(path);
    
      const response = await fetch(url.toString(), {
        method: "POST",
        headers: buildHeaders(token),
        body: JSON.stringify(body),
      });
    
      return handleResponse<T>(response);
    }
  • The formatCreate helper used by the handler to format the created resource as a success message.
    export function formatCreate(record: EduframeRecord, resourceName: string): CallToolResult {
      return {
        content: [
          {
            type: "text",
            text: `Successfully created ${resourceName}:\n\n${formatJSON(record)}${RESPONSE_LOG_HINT}`,
          },
        ],
      };
    }
Behavior2/5

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

Annotations indicate readOnlyHint false, destructiveHint false, and idempotentHint false, showing it is a non-idempotent write operation. The description adds no further behavioral context, such as side effects or permissions required.

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

Conciseness3/5

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

The description is a single sentence, making it concise but lacking in substance. It could be more informative without sacrificing brevity.

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 simple tool with two parameters and no output schema, the description is minimal and does not explain what an invoice vat is or how it relates to other invoice operations. It is incomplete for effective tool selection.

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 covers both parameters with clear descriptions (name and percentage). With 100% schema coverage, the description adds no additional meaning beyond what the schema provides, meeting the baseline.

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 'Create an invoice vat' clearly states a verb and resource, distinguishing it from sibling tools like create_invoice and create_invoice_payment. However, it does not elaborate on what an invoice vat is, leaving some ambiguity.

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 such as get_invoice_vats or other create tools. The description lacks context for appropriate 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/martijnpieters/eduframe-mcp'

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