Skip to main content
Glama

get_location_at_time

Retrieve user location data for a specific time from Context By Fulcra, using nearest available sample within a configurable time window.

Instructions

Gets the user's location at the given time.

If no sample is available for the exact time, searches for the closest one up to window_size seconds back.

Result timestamps will include time zones. Always translate timestamps to the user's local time zone when this is known.

Args: time: The point in time to get the user's location for. Must include tz (ISO8601). window_size: Optional. The size (in seconds) to look back (and optionally forward) for samples. Defaults to 14400. include_after: Optional. When true, a sample that occurs after the requested time may be returned if it is the closest one. Defaults to False. Returns: A JSON string representing the location data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeYes
window_sizeNo
reverse_geocodeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'get_location_at_time' tool. It is decorated with @mcp.tool() which registers it with the FastMCP server. The function retrieves the user's location at a specified time using the FulcraAPI, with options for window size and reverse geocoding. Type hints define the input schema.
    @mcp.tool()
    async def get_location_at_time(
        time: datetime,
        window_size: int = 14400,
        reverse_geocode: bool | None = False,
    ) -> str:
        """Gets the user's location at the given time.
    
        If no sample is available for the exact time, searches for the closest one up to
        window_size seconds back.
    
        Result timestamps will include time zones. Always translate timestamps to the user's local
        time zone when this is known.
    
        Args:
            time: The point in time to get the user's location for. Must include tz (ISO8601).
            window_size: Optional. The size (in seconds) to look back (and optionally forward) for samples. Defaults to 14400.
            include_after: Optional. When true, a sample that occurs after the requested time may be returned if it is the closest one. Defaults to False.
        Returns:
            A JSON string representing the location data.
        """
        fulcra = get_fulcra_object()
        kwargs = {}
        if window_size is not None:
            kwargs["window_size"] = window_size
        kwargs["include_after"] = True
        kwargs["reverse_geocode"] = True
    
        location_data = fulcra.location_at_time(
            time=time,
            **kwargs,
        )
        return f"Location info at {time}: " + json.dumps(location_data)
Behavior4/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 effectively describes key behaviors: searching for closest samples within a window, handling time zones, and returning JSON data. It doesn't cover aspects like error handling, rate limits, or authentication needs, but it provides sufficient operational context for basic use.

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 well-structured and front-loaded, starting with the core purpose. Each sentence adds value: explaining sample search logic, time zone handling, and parameter/return details. There's no redundant or wasted text, making it efficient and easy to parse for an AI agent.

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 complexity (time-based location querying) and lack of annotations, the description is mostly complete. It covers purpose, key behaviors, and most parameters, and an output schema exists, so return values don't need explanation. The main gap is the undocumented 'reverse_geocode' parameter, which slightly reduces completeness.

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?

Schema description coverage is 0%, so the description must compensate. It adds meaning for 'time' (must include tz in ISO8601), 'window_size' (seconds to look back, with default), and 'include_after' (optional behavior). However, it doesn't mention 'reverse_geocode' from the input schema, leaving one parameter undocumented. This partial coverage slightly reduces the score from a perfect 5.

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: 'Gets the user's location at the given time.' It specifies the verb ('Gets') and resource ('user's location'), making it easy to understand. However, it doesn't explicitly differentiate from sibling tools like 'get_location_time_series' or 'get_metric_samples,' which could provide similar location-related data.

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 how the tool handles missing samples and time zone translation, but it doesn't explicitly state when to use this tool versus alternatives like 'get_location_time_series.' It provides some context on behavior (e.g., searching for closest samples) but lacks clear guidance on scenarios or prerequisites for choosing this tool over siblings.

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/fulcradynamics/fulcra-context-mcp'

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