Skip to main content
Glama
cornelcroi

French Tax MCP Server

by cornelcroi

generate_tax_report

Create detailed French tax reports on specific topics using provided tax data. Generate formatted documents for income tax calculations and official government information.

Instructions

Generate a detailed report about a specific tax topic

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tax_dataYes
topic_nameYes
output_fileNo
formatNomarkdown
ctxNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Registration of the MCP tool 'generate_tax_report' with decorator and thin wrapper handler that delegates to the core implementation.
    @mcp.tool(
        name="generate_tax_report",
        description="Generate a detailed report about a specific tax topic",
    )
    async def generate_tax_report_wrapper(
        tax_data: Dict[str, Any],
        topic_name: str,
        output_file: Optional[str] = None,
        format: str = "markdown",
        ctx: Optional[Context] = None,
    ) -> str:
        """Generate a tax information report.
    
        Args:
            tax_data: Tax information data
            topic_name: Name of the tax topic
            output_file: Optional path to save the report
            format: Output format ('markdown' or 'csv')
            ctx: MCP context for logging
    
        Returns:
            str: The generated report
        """
        try:
            if ctx:
                await ctx.info(f"Generating report for {topic_name}")
    
            report = await generate_tax_report(tax_data, topic_name, output_file, format)
            return report
        except Exception as e:
            if ctx:
                await ctx.error(f"Failed to generate tax report: {e}")
            return f"Error generating report: {str(e)}"
  • Core handler logic in ReportGenerator class: determines report type, generates Markdown or CSV reports using templates, and optionally saves to file.
    async def generate_tax_report(
        self,
        tax_data: Dict[str, Any],
        topic_name: str,
        output_file: Optional[str] = None,
        format: str = "markdown",
    ) -> str:
        """Generate a tax information report.
    
        Args:
            tax_data: Tax information data
            topic_name: Name of the tax topic
            output_file: Optional path to save the report
            format: Output format ('markdown' or 'csv')
    
        Returns:
            The generated report
        """
        logger.info(f"Generating report for {topic_name}")
    
        try:
            # Determine report type based on tax_data
            report_type = self._determine_report_type(tax_data, topic_name)
    
            # Generate report based on type
            if format.lower() == "csv":
                report = self._generate_csv_report(tax_data, topic_name, report_type)
            else:
                report = self._generate_markdown_report(tax_data, topic_name, report_type)
    
            # Save to file if output_file is specified
            if output_file:
                try:
                    output_path = Path(output_file)
                    output_path.parent.mkdir(parents=True, exist_ok=True)
                    with open(output_file, "w", encoding="utf-8") as f:
                        f.write(report)
                    logger.info(f"Report saved to {output_file}")
                except Exception as e:
                    logger.error(f"Failed to save report to {output_file}: {e}")
    
            return report
    
        except Exception as e:
            logger.error(f"Error generating tax report: {e}")
            return f"Error generating report: {str(e)}"
  • Top-level helper function and singleton instance that provides the imported generate_tax_report interface called by the MCP wrapper.
    report_generator = ReportGenerator()
    
    
    async def generate_tax_report(
        tax_data: Dict[str, Any],
        topic_name: str,
        output_file: Optional[str] = None,
        format: str = "markdown",
    ) -> str:
        """Generate a tax information report.
    
        Args:
            tax_data: Tax information data
            topic_name: Name of the tax topic
            output_file: Optional path to save the report
            format: Output format ('markdown' or 'csv')
    
        Returns:
            The generated report
        """
        return await report_generator.generate_tax_report(tax_data, topic_name, output_file, format)
Behavior2/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 mentions generating a 'detailed report' but doesn't specify if this is a read-only operation, whether it modifies data, requires authentication, has rate limits, or what the output entails (e.g., file creation, format defaults). This is a significant gap for a tool with 5 parameters and no annotation coverage.

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 a single, efficient sentence that front-loads the core action ('Generate a detailed report'). There's no wasted verbiage, but it could be more structured by hinting at key parameters or usage context. It's appropriately sized for a basic tool but lacks depth.

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 complexity (5 parameters, nested objects, no annotations) and the presence of an output schema, the description is incomplete. It doesn't address behavioral aspects like mutation risks or auth needs, and while the output schema might cover return values, the description should still clarify the tool's role versus siblings and parameter semantics. For a tool with this level of complexity, it's inadequate.

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

Parameters2/5

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

Schema description coverage is 0%, meaning parameters are undocumented in the schema. The description adds no information about parameters like 'tax_data', 'topic_name', 'output_file', 'format', or 'ctx', leaving their purposes, formats, or constraints unclear. For example, it doesn't explain what 'tax_data' should contain or how 'topic_name' relates to the report. This fails to compensate for the low schema coverage.

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

Purpose3/5

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

The description states the tool 'Generate[s] a detailed report about a specific tax topic', which provides a clear verb ('generate') and resource ('report'), but it's vague about what constitutes a 'detailed report' and doesn't differentiate from siblings like 'get_tax_article' or 'search_tax_law' that might also provide tax information. It's adequate but lacks specificity about the report's nature or format.

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. With siblings like 'get_tax_article' or 'search_tax_law', the description doesn't clarify if this is for synthesized reports, official documents, or user-specific analyses. There's no mention of prerequisites, such as needing tax data input, which is implied by the schema but not stated in the description.

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/cornelcroi/french-tax-mcp'

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