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

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)

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