Skip to main content
Glama

get_document_types

Retrieve configured document types like invoices and credit notes from Siigo accounting software, with optional filtering by specific type codes.

Instructions

Get all configured document types.

Args: document_type: Optional filter by type (FV=invoice, NC=credit note, etc.)

Returns a list of document types configured in the account. Common types: FV (factura), NC (nota crédito), RC (recibo de caja).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_typeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core implementation of the 'get_document_types' MCP tool handler. It fetches document types from the Siigo API, optionally filtered by type.
    @mcp.tool
    async def get_document_types(
        ctx: Context,
        document_type: str | None = None,
    ) -> list[dict[str, Any]]:
        """Get all configured document types.
    
        Args:
            document_type: Optional filter by type (FV=invoice, NC=credit note, etc.)
    
        Returns a list of document types configured in the account.
        Common types: FV (factura), NC (nota crédito), RC (recibo de caja).
        """
        params: dict[str, Any] = {}
        if document_type:
            params["type"] = document_type
        return await get_client(ctx).get("/document-types", params=params or None)
  • Registration of the tool in the dynamic tool functions map for lazy loading in discovery mode.
    "get_document_types": reference.get_document_types,
  • Discovery index entry providing metadata (name, category, summary) for the tool schema.
    {"name": "get_warehouses", "category": "reference", "summary": "Get all warehouse locations"},
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that it returns a list and mentions common types (FV, NC, RC), which adds useful context. However, it doesn't cover behavioral aspects like error handling, rate limits, authentication needs, or whether it's read-only (implied by 'Get' but not explicit). The description doesn't contradict annotations, but gaps remain.

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 appropriately sized and front-loaded: the first sentence states the core purpose, followed by parameter details and return information. Every sentence adds value, such as the examples of common types. It could be slightly more structured by separating returns from args, but it's efficient with minimal waste.

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

Completeness4/5

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

Given the tool's low complexity (1 optional parameter) and the presence of an output schema (which handles return values), the description is fairly complete. It covers the purpose, parameter semantics, and return context. However, it lacks details on behavioral traits like error cases or performance, which would be helpful despite the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate. It adds meaning by explaining the optional 'document_type' parameter: it filters by type and provides examples (FV=invoice, NC=credit note). This clarifies the parameter's purpose and format beyond the schema's basic string/null definition. However, it doesn't detail all possible types or validation rules.

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 the tool's purpose: 'Get all configured document types.' It specifies the verb ('Get') and resource ('document types'), and distinguishes it from siblings like get_invoice or get_credit_note by focusing on metadata rather than specific documents. However, it doesn't explicitly contrast with get_payment_types or get_taxes, which are similar configuration-fetching tools.

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 description implies usage by mentioning an optional filter and common types, suggesting it's for retrieving document type configurations. However, it lacks explicit guidance on when to use this tool versus alternatives like get_invoice (for specific invoices) or get_payment_types (for other configuration data). No exclusions or prerequisites are stated.

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/dsfaccini/siigo-mcp'

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