Skip to main content
Glama
cmendezs

mcp-fattura-elettronica-it

get_regime_fiscale_codes

Retrieve the complete list of Italian fiscal regime codes (RF01–RF19) with descriptions to select the correct regime code for your seller before validation.

Instructions

Return the complete list of RegimeFiscale codes (RF01–RF19) with descriptions.

Call this to look up the correct fiscal regime code before calling validate_cedente_prestatore(). Every Italian seller must declare a regime: RF01 (ordinary) covers most companies; RF19 (forfettario) covers flat-rate sole traders; all other codes cover specialised VAT regimes.

Always succeeds. Returns {'codes': [{'code': str, 'description': str}, ...], 'total': int}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for get_regime_fiscale_codes. It returns a list of all RegimeFiscale codes (RF01–RF19) with descriptions from the REGIME_FISCALE dict, plus a total count.
    @mcp.tool()
    def get_regime_fiscale_codes() -> dict:
        """Return the complete list of RegimeFiscale codes (RF01–RF19) with descriptions.
    
        Call this to look up the correct fiscal regime code before calling
        validate_cedente_prestatore(). Every Italian seller must declare a regime:
        RF01 (ordinary) covers most companies; RF19 (forfettario) covers flat-rate
        sole traders; all other codes cover specialised VAT regimes.
    
        Always succeeds. Returns {'codes': [{'code': str, 'description': str}, ...], 'total': int}.
        """
        codes = [{"code": code, "description": desc} for code, desc in REGIME_FISCALE.items()]
        return {"codes": codes, "total": len(codes)}
  • Registration function that registers all header tools (including get_regime_fiscale_codes) on the FastMCP instance via the @mcp.tool() decorator.
    def register_header_tools(mcp: FastMCP) -> None:
  • The data dict mapping all RegimeFiscale codes to their Italian descriptions (RF01–RF19, note: RF03 intentionally omitted per specs). This is the data source for get_regime_fiscale_codes.
    REGIME_FISCALE: dict[str, str] = {
        "RF01": "Regime ordinario",
        "RF02": "Regime contribuenti minimi (art. 1, c.96-117, L. 244/2007)",
        "RF04": "Agricoltura e attività connesse e pesca (artt. 34 e 34-bis, DPR 633/72)",
        "RF05": "Vendita sali e tabacchi (art. 74, c.1, DPR. 633/72)",
        "RF06": "Commercio fiammiferi (art. 74, c.1, DPR. 633/72)",
        "RF07": "Editoria (art. 74, c.1, DPR. 633/72)",
        "RF08": "Gestione servizi telefonia pubblica (art. 74, c.1, DPR. 633/72)",
        "RF09": "Rivendita documenti di trasporto pubblico e di sosta (art. 74, c.1, DPR. 633/72)",
        "RF10": "Intrattenimenti, giochi e altre attività (art. 74, c.6, DPR. 633/72)",
        "RF11": "Agenzie viaggi e turismo (art. 74-ter, DPR. 633/72)",
        "RF12": "Agriturismo (art. 5, c.2, L. 413/91)",
        "RF13": "Vendite a domicilio (art. 25-bis, c.6, DPR. 600/73)",
        "RF14": "Rivendita beni usati, oggetti d'arte, d'antiquariato o da collezione (art. 36, DL 41/95)",
        "RF15": "Agenzie di vendite all'asta di oggetti d'arte, antiquariato o da collezione (art. 40-bis, DL 41/95)",
        "RF16": "IVA per cassa P.A. (art. 6, c.5, DPR. 633/72)",
        "RF17": "IVA per cassa (art. 32-bis, DL 83/2012)",
        "RF18": "Altro",
        "RF19": "Regime forfettario (art. 1, c.54-89, L. 190/2014)",
    }
  • Unit test verifying get_regime_fiscale_codes returns all 18 codes (RF03 excluded) and includes RF01 and RF19.
    def test_returns_all_codes(self):
        result = call("get_regime_fiscale_codes")
        assert result["total"] == len(REGIME_FISCALE)  # 18 codes (RF03 does not exist in official specs)
  • Integration test verifying get_regime_fiscale_codes returns 18 codes when called via MCP.
    async def test_get_regime_fiscale_codes_returns_codes(self):
        """get_regime_fiscale_codes returns all valid fiscal regime codes (RF03 does not exist)."""
        async with Client(mcp) as client:
            result = await client.call_tool("get_regime_fiscale_codes", {})
        data = _parse(result)
        assert data["total"] == 18  # RF03 does not exist in the official FatturaPA specs
        codes = {c["code"] for c in data["codes"]}
        assert "RF01" in codes
        assert "RF19" in codes
Behavior4/5

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

No annotations are provided, so the description fully handles transparency. It states 'Always succeeds' and describes the return format in detail. It does not mention authentication or rate limits, but for a simple read-only lookup, these omissions are acceptable and the description remains highly transparent.

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

Conciseness5/5

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

The description is extremely concise at four sentences, each serving a distinct purpose: purpose, usage guidance, examples, and reliability/return format. No unnecessary words or redundancy, ideal for quick agent parsing.

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

Completeness5/5

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

Given the tool's simplicity (no parameters, output schema exists), the description is fully complete. It covers purpose, when to use, what it returns, and reliability, leaving no gaps for an agent to misinterpret.

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 tool has zero parameters, so the baseline is 4. The description adds value by explaining the output structure and providing example codes, which indirectly aids understanding of the tool's behavior, though it does not relate to parameter semantics directly.

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 clearly states the tool returns the complete list of RegimeFiscale codes with descriptions, specifying the range RF01–RF19. It distinguishes itself from sibling tools by positioning it as a prerequisite for validate_cedente_prestatore, making its purpose unmistakable.

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

Usage Guidelines4/5

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

The description explicitly advises calling this tool before validate_cedente_prestatore to look up the correct regime code, providing context for Italian sellers. It gives examples of RF01 and RF19, but lacks explicit when-not-to-use exclusions; however, given the simple use case, this is clear enough.

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/cmendezs/mcp-fattura-elettronica-it'

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