Skip to main content
Glama

issue_e_document

Officializes an existing sales invoice as a Turkish e-document by checking the recipient's VKN: issues an e-Fatura for registered taxpayers or an e-Arşiv otherwise.

Instructions

Officialize an existing sales invoice as an e-document: looks up the recipient's e-Fatura inbox by VKN, issues an e-Fatura if registered or an e-Arşiv otherwise, and (by default) waits for the async job.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sales_invoice_id": "<sales_invoice_id>",
      "recipient_vkn": "<recipient_vkn>"
    },
    "name": "issue_e_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
waitNoPoll the async job until it finishes (~up to 20s)
scenarioNoe-Fatura scenario (used only for e-Fatura)basic
recipient_vknYesRecipient tax number (VKN/TCKN) — used to decide e-Fatura vs e-Arşiv
sales_invoice_idYesID of an existing sales invoice to officialize as an e-document

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does real work: it discloses a multi-step side-effecting flow (inbox lookup by VKN, then issuance with a scenario-dependent document type) and that an async job is created and polled by default. It stops short of stating irreversibility, permission/auth requirements, or what happens if the invoice was already officialized, which keeps it off a 5.

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

Conciseness4/5

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

One front-loaded sentence with the action first and the branching and async behavior trailing; no filler. It is dense — three clauses chained with colons and parentheses — which costs a little readability, but every clause carries information an agent needs.

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

Completeness3/5

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

There is no output schema and no annotations, so the description must stand in for both. It explains the process and that a job is awaited, but never says what the caller gets back (e-document identifier, job ID, status) or how failures surface, which leaves a real gap for an async side-effecting operation.

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 all four parameters are already documented in the schema, including the wait polling window and the scenario enum restriction to e-Fatura. The description reinforces that the VKN drives channel selection but adds no format, validation, or edge-case meaning beyond the schema, so the baseline 3 applies.

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

Purpose5/5

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

The description gives a specific verb and resource ('Officialize an existing sales invoice as an e-document') and then explains the internal routing — e-Fatura if the VKN is registered, e-Arşiv otherwise. That routing logic is precisely what distinguishes this tool from the create_e_invoice and create_e_archive siblings, so an agent can pick correctly without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by 'existing sales invoice': use it when the invoice already exists and needs to be officialized. However, no sibling is named and there is no explicit when-not guidance (e.g. when to prefer create_e_invoice/create_e_archive directly, or whether this is safe to retry if a job was already issued). The agent must infer the boundaries.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.