Skip to main content
Glama

get_current_date

Retrieve the current date in YYYY-MM-DD format for legal document analysis and date calculations within legal research workflows.

Instructions

Get the current date in YYYY-MM-DD format. Useful for legal document analysis and date calculations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • app.py:80-110 (handler)
    The handler function get_actual_date() that executes the tool logic, fetching and formatting the current date using datetime.now().
    def get_actual_date() -> str:
        """Returns the current date in YYYY-MM-DD format for legal research and document analysis.
    
        This function provides the current system date, which is essential for legal
        document analysis, calculating effective dates, and determining document validity
        periods in legal research contexts.
    
        Returns:
            str: Current date string in YYYY-MM-DD format, or empty string if an error occurs.
    
        Examples:
            User asks: "What is today's date?":
                Returns: "2025-01-17"
            User asks: "Show me the current date for legal document analysis":
                Returns: "2025-01-17"
            User asks: "Give me today's date in YYYY-MM-DD format":
                Returns: "2025-01-17"
            User asks: "What date is it right now?":
                Returns: "2025-01-17"
            User asks: "I need the current date for my legal report":
                Returns: "2025-01-17"
        """
        logger.debug("get_actual_date called")
        try:
            result = datetime.now().strftime("%Y-%m-%d")
            logger.info(f"get_actual_date returned: {result}")
            return result
        except Exception as e:
            logger.error(f"Error: {e}")
            return ""
  • app.py:75-79 (registration)
    Registration of the get_current_date tool via the @app.tool decorator, specifying name, description, and tags.
    @app.tool(
        name="get_current_date",
        description="Get the current date in YYYY-MM-DD format. Useful for legal document analysis and date calculations.",
        tags={"dates", "utility"}
    )
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 of behavioral disclosure. It clearly states the output format and two use cases, but doesn't mention whether the date is server-local or UTC, if there are any rate limits, or what happens on failure. For a zero-parameter tool, this is adequate but not comprehensive.

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 perfectly concise with two sentences that each earn their place: the first states exactly what the tool does and its output format, the second provides valuable context about when to use it. No wasted words, front-loaded with the core functionality.

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 this is a simple zero-parameter tool with an output schema (which presumably documents the return format), the description provides adequate context. It explains the purpose, format, and use cases. For maximum completeness, it could mention timezone behavior, but the presence of an output schema reduces the need for return value explanation.

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 with 100% schema description coverage, so the baseline is 4. The description appropriately doesn't discuss parameters since none exist, and instead focuses on the output format and use cases, which adds value beyond the empty input schema.

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 specific action ('Get the current date') and the exact output format ('YYYY-MM-DD format'), distinguishing it from sibling tools like calculate_date_offset which performs calculations rather than retrieval. The verb+resource combination is precise and unambiguous.

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 provides clear context for when to use this tool ('Useful for legal document analysis and date calculations'), though it doesn't explicitly state when NOT to use it or name specific alternatives. The mention of 'legal document analysis' connects it to the sibling tools in the legal domain, but no explicit comparison is made.

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/numikel/law-scrapper-mcp'

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