Skip to main content
Glama

trace_attributes

Read-onlyIdempotent

Trace attributes return road/network attributes for matched traces. Feed a GPS breadcrumb trail (2–100 points) and get per-segment road names, road classes, speed limits, surfaces, truck-route flags, and segment lengths along the matched route, plus a matcher confidence score. Sparsely-reported traces (consecutive fixes farther apart than the default breakage distance — e.g. fleet units reporting every several minutes on a highway) can split into multiple sections; increase breakage_distance_m to keep them as one. Total matched distance is limited to 200 km per call — split longer sparse traces by distance, not only by the 100-point cap. Use to audit what roads a vehicle actually used (speed-limit compliance, truck-route adherence, surface checks). For just the matched route line, use map_match.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "shape": "<shape>"
    },
    "name": "trace_attributes"
  }
}

Input Schema

NameRequiredDescriptionDefault
shapeYesRaw GPS breadcrumb trail in travel order — 2 to 100 points of { lat, lon, time? }. `time` is optional epoch seconds; timestamps improve match quality on noisy traces.
costingNoTransport mode the trace was recorded with (default: auto)
search_radiusNoSnap radius in meters around each point (1–100). Increase for noisy GPS.
vehicle_profileNoTruck preset (DRY_VAN_53, FLATBED_48, BOX_TRUCK_26, …) — same 10-profile table as directions. Implies costing=truck.
breakage_distance_mNoMaximum gap, in meters, between consecutive fixes before the trace is split into separate sections (100–20000). Increase for sparsely-reported GPS, such as fleet units reporting every several minutes on a highway. Optional — omitted uses the default.

Output Schema

NameRequiredDescriptionDefault
metaNo
edgesYes
adminsNo
costingYes
geojsonNo
matchedYes
geometryNo
confidenceYesMatcher confidence 0–1
edge_countYes
road_namesYes
distance_kmYes
costing_optionsNo
vehicle_profileNo
duration_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • changedOutput schema / additionalProperties
      Previous value: -trueNew value: +{}
    • addedOutput schema / properties / admins / items / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / costing_options / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / properties / edges / items / additionalProperties
      Previous value: -trueNew value: +{}
    • changedOutput schema / properties / geojson / additionalProperties
      Previous value: -trueNew value: +{}
    • changedOutput schema / properties / geojson / properties / features / items / additionalProperties
      Previous value: -trueNew value: +{}
    • changedOutput schema / properties / geojson / properties / features / items / properties / geometry / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "properties": {
      -      "coordinates": {},
      -      "geometries": {
      -        "items": {},
      -        "type": "array"
      -      },
      -      "type": {
      -        "anyOf": [
      -          {
      -            "enum": [
      -              "Point",
      -              "LineString",
      -              "Polygon",
      -              "MultiPoint",
      -              "MultiLineString",
      -              "MultiPolygon",
      -              "GeometryCollection"
      -            ],
      -            "type": "string"
      -          },
      -          {
      -            "type": "string"
      -          }
      -        ]
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "properties": {
      +      "coordinates": {},
      +      "geometries": {
      +        "items": {},
      +        "type": "array"
      +      },
      +      "type": {
      +        "anyOf": [
      +          {
      +            "enum": [
      +              "Point",
      +              "LineString",
      +              "Polygon",
      +              "MultiPoint",
      +              "MultiLineString",
      +              "MultiPolygon",
      +              "GeometryCollection"
      +            ],
      +            "type": "string"
      +          },
      +          {
      +            "type": "string"
      +          }
      +        ]
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / geojson / properties / features / items / properties / properties / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / geometry / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / properties / meta / additionalProperties
      Previous value: -trueNew value: +{}
  2. Changed4 schema fields changed
    • addedInput schema / properties / breakage_distance_m
      Added value: +{
      +  "description": "Maximum gap, in meters, between consecutive fixes before the trace is split into separate sections (100–20000). Increase for sparsely-reported GPS, such as fleet units reporting every several minutes on a highway. Optional — omitted uses the default.",
      +  "maximum": 20000,
      +  "minimum": 100,
      +  "type": "integer"
      +}
    • changedOutput schema / properties / meta / additionalProperties
      Previous value: -{}New value: +true
    • addedOutput schema / properties / meta / properties
      Added value: +{
      +  "breakage_distance_m": {
      +    "description": "Echoes the breakage_distance_m the caller requested, for confirmation — present only when the caller set it. This is the value SENT to the matcher, not a claim about what it did with it.",
      +    "type": "integer"
      +  },
      +  "point_count": {
      +    "type": "integer"
      +  },
      +  "upstream_ms": {
      +    "type": "number"
      +  }
      +}
    • addedOutput schema / properties / meta / required
      Added value: +[
      +  "upstream_ms",
      +  "point_count"
      +]
  3. Added

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish read-only, idempotent, and open-world behavior. The description adds important beyond-annotation context: per-segment output fields, matcher confidence, section splitting from breakage distance, the 100-point cap, and the 200 km total-distance limit.

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 dense and front-loaded: it states the core purpose, output shape, key constraints, sparse-trace handling, and sibling alternative without filler. Length is justified by the geospatial and batching caveats.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool’s complexity and the presence of an output schema, the description covers purpose, usage, batching limits, sparse-trace behavior, and the relevant alternative. An agent has enough context to decide when and how to call it.

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 100%, so the schema already documents all five parameters in detail. The description adds some practical guidance for breakage_distance_m and mentions point/distance caps, but it does not materially explain costing, search_radius, or vehicle_profile beyond the 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 opening sentence uses a specific verb and resource: it returns road/network attributes for matched traces. It then enumerates the per-segment outputs and explicitly distinguishes itself from map_match for route-line-only needs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states the audit use case (speed-limit compliance, truck-route adherence, surface checks) and names map_match as the alternative when only the matched route line is needed. It also gives operational guidance for sparse traces and the 200 km per-call limit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources