Skip to main content
Glama
cornelcroi

French Tax MCP Server

by cornelcroi

get_tax_deadlines

Retrieve French tax deadlines from official government sources to help plan and meet filing requirements.

Instructions

Get tax deadlines from service-public.fr

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearNo
ctxNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool registration decorator for 'get_tax_deadlines'.
    @mcp.tool(
        name="get_tax_deadlines",
        description="Get tax deadlines from service-public.fr",
    )
  • The MCP tool handler wrapper that delegates to the service_public_scraper.get_tax_deadlines function.
    async def get_tax_deadlines_wrapper(
        year: Optional[int] = None,
        ctx: Optional[Context] = None,
    ) -> Optional[Dict]:
        """Get tax deadlines from service-public.fr.
    
        Args:
            year: The tax year to retrieve deadlines for (defaults to current year)
            ctx: MCP context for logging
    
        Returns:
            Dict: Dictionary containing tax deadlines
        """
        try:
            if ctx:
                await ctx.info(f"Getting tax deadlines for year {year or 'current'}")
    
            from french_tax_mcp.scrapers.service_public_scraper import get_tax_deadlines
            result = await get_tax_deadlines(year)
            return result
        except Exception as e:
            if ctx:
                await ctx.error(f"Failed to get tax deadlines: {e}")
            return {
                "status": "error",
                "message": f"Error getting tax deadlines: {str(e)}",
            }
  • Core scraping logic for tax deadlines in ServicePublicScraper class method.
    async def get_tax_deadlines(self, year: Optional[int] = None) -> Dict:
        """Scrape tax deadlines from service-public.fr.
    
        Args:
            year: The tax year to retrieve deadlines for. Defaults to current year.
    
        Returns:
            Dictionary containing tax deadlines
        """
        # Set default year to current year if not specified
        current_year = datetime.now().year
        tax_year = year or current_year
    
        logger.info(f"Scraping tax deadlines for year {tax_year}")
    
        try:
            # Get the page
            response = await self.get_page(DEADLINES_URL)
    
            # Parse HTML
            soup = self.parse_html(response.text)
    
            # Extract deadlines
            deadlines = self._extract_deadlines(soup, tax_year)
    
            return self.format_result(
                status="success",
                data={
                    "year": tax_year,
                    "deadlines": deadlines,
                },
                message=f"Successfully retrieved tax deadlines for {tax_year}",
                source_url=f"{BASE_URL}{DEADLINES_URL}",
            )
    
        except Exception as e:
            logger.error(f"Error scraping tax deadlines: {e}")
            return self.format_result(
                status="error",
                message=f"Failed to retrieve tax deadlines: {str(e)}",
                data={"year": tax_year},
                error=e,
            )
  • Standalone convenience function that invokes the singleton scraper's get_tax_deadlines method.
    async def get_tax_deadlines(year: Optional[int] = None) -> Dict:
        """Scrape tax deadlines from service-public.fr.
    
        Args:
            year: The tax year to retrieve deadlines for. Defaults to current year.
    
        Returns:
            Dictionary containing tax deadlines
        """
        return await service_public_scraper.get_tax_deadlines(year)
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 states 'Get tax deadlines' but doesn't describe what the tool returns (e.g., list of deadlines, dates, formats), whether it requires authentication, rate limits, or if it's a read-only operation. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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—a single, clear sentence with no wasted words. It's front-loaded with the core purpose, making it easy to scan and understand quickly. Every word earns its place by specifying the action, resource, and source.

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?

Given that there's an output schema (which handles return values), no annotations, and low schema coverage, the description is incomplete. It doesn't address behavioral aspects like authentication needs or rate limits, and with 0% schema coverage, it fails to explain parameters. However, the output schema mitigates some gaps, making it minimally adequate but with clear deficiencies.

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 0%, so the schema provides no parameter documentation. The description mentions 'tax deadlines' but doesn't explain the 'year' parameter (e.g., optional filtering by year) or the 'ctx' parameter (context object). It adds minimal semantic value beyond the tool name, failing to compensate for the lack of schema descriptions.

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 action ('Get') and resource ('tax deadlines from service-public.fr'), making the purpose immediately understandable. It doesn't differentiate from siblings like 'get_tax_info_from_web' or 'get_cached_tax_info', which might also retrieve tax information, but it's specific about the type of information (deadlines) and source (service-public.fr).

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_info_from_web' and 'get_cached_tax_info', the description lacks context on whether this is for official deadlines, cached data, or web-scraped info. It doesn't mention prerequisites, exclusions, or comparisons to other tools.

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