Skip to main content
Glama

location_sql

Run read-only SQL queries to access detailed location history, including stays, trips, places, and daily movement patterns, for custom analysis beyond predefined tools.

Instructions

Read-only SELECT for questions the other tools do not shape. Tables: location_visits(started_at, ended_at, start_offset_m, place_id, semantic_type), location_activities(started_at, ended_at, mode, distance_m, start_lat, start_lon, end_lat, end_lon), location_places(id, lat, lon, address, label, city, admin, country, country_code, tz), location_pings, location_raw_positions(altitude_m, speed_ms), location_trips. Views: location_v_stays (the history spine), location_m_day_home (one row per day with the anchor place and km from home), location_v_records, location_v_home_periods. With the people bridge installed: location_trip_people, location_v_trip_people, people_v_trips.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoRow cap. Default 200.
queryYesA single SELECT statement.
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. It discloses the read-only nature ('Read-only SELECT'), which is critical safety information. However, it does not describe other behavioral traits such as query result limits (beyond schema), performance expectations, or error handling, leaving some uncertainty for a raw SQL tool.

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 opens with a concise, front-loaded purpose statement and then systematically organizes the database objects into Tables, Views, and a conditional 'people bridge' section. It is long due to the schema listing, but every piece is relevant for a raw SQL tool, so the length is justified.

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 (arbitrary SQL), providing the full schema is essential and mostly complete. It also notes the optional people bridge installation. However, it lacks an example query, any note about query complexity limitations, or details on how results are returned, which would make it fully complete.

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?

Although schema descriptions cover both parameters, the tool description adds substantial context for the 'query' parameter by enumerating all available tables and views with their columns. This transforms a generic 'SELECT statement' into something actionable. The 'limit' parameter is not elaborated further, so the score reflects the high value added for the primary parameter.

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 starts with 'Read-only SELECT', a specific verb and resource that clearly defines the tool's action. It also distinguishes itself from siblings with 'for questions the other tools do not shape', signaling it's the fallback for raw SQL queries. The detailed list of tables and views further specifies its domain.

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 phrase 'for questions the other tools do not shape' gives clear context for when to use this tool instead of dedicated tools. However, it does not name specific sibling tools or state explicit exclusions (e.g., 'use trips for travel overviews'), so the guidance is good but not fully explicit.

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/michelgrolet/tars-location-mcp'

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