Skip to main content
Glama

AI 开票助手 · 电子发票开具

invoice_create_draft

第 1 步:把订单信息(文字描述或结构化明细)生成发票草稿。自动校验购方税号格式、税率合法性、金额上限,并自动计算税额与价税合计。草稿免费生成,24 小时内有效。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes商品/服务明细
remarkNo发票备注(如订单号、项目名)
buyer_nameYes购方名称(企业/个人抬头)
buyer_tax_idNo购方税号(统一社会信用代码,15/18/20 位);个人开票传空
invoice_typeNo发票类型,默认普通发票(数电普票)

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It discloses several key behaviors: automatic validation of buyer tax ID format, tax rate legality, amount limits, auto-calculation of tax and total, free generation, and a 24-hour validity period. However, it omits what happens on validation failure, whether it creates a persistent entity, and the response format. These are notable gaps for a mutation tool.

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?

The description is two sentences, front-loaded with the purpose and step context, and contains no fluff. It efficiently conveys the core function and key behaviors, though it could be more explicit about workflow integration. It earns a high score for brevity and clarity.

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 no output schema and no annotations, the description must compensate for a moderate-complexity tool with 5 parameters. It misses critical information: how to reference the generated draft in subsequent steps (e.g., a draft ID), what happens on validation failure, and the response structure. Additionally, the claim '文字描述或结构化明细' conflicts with the schema which only accepts structured items, creating ambiguity. The description is incomplete for an agent to fully understand the workflow and error handling.

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 already documents all parameters. The description adds no additional parameter semantics beyond what the schema provides; it only mentions behavioral aspects like validation. The baseline of 3 applies because the schema carries the parameter meaning effectively.

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 it generates an invoice draft from order information, using a specific verb 'generate' and resource 'invoice draft'. It labels itself as 'Step 1' which implies a workflow position but does not explicitly name sibling tools like invoice_confirm_issue, so differentiation is implicit rather than explicit.

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?

The phrase '第 1 步' provides clear context that this tool is the first step in the invoice workflow, implying use before confirmation. However, it does not explicitly state when not to use it or name alternatives, such as 'use invoice_confirm_issue to issue the finalized invoice'. The guidance is implicit, not explicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.9/5.0
Disambiguation5/5

Each tool has a clearly distinct role: create draft, confirm draft issuance, query records, and view service info. Although confirm_issue depends on create_draft, their purposes and required inputs are unambiguous.

Naming Consistency4/5

Core tools consistently use the invoice_ prefix with snake_case verbs (create_draft, confirm_issue, query), but invoice_query is more noun-like and service_info breaks the prefix pattern. Overall the naming is still predictable and readable.

Tool Count5/5

Four tools is well-scoped for this small invoice-issuance domain. Each tool covers an essential action in the workflow without redundancy or unnecessary surface area.

Completeness4/5

The core workflow of creating a draft, confirming issuance, and querying records is covered. There are minor gaps such as no draft update/delete or invoice void/red-issuance capability, but agents can work around them by creating a new draft within the 24-hour validity window.

Resources