Skip to content

Conversation

@ctufts
Copy link
Contributor

@ctufts ctufts commented Jan 7, 2026

Description

  • Fixes incorrect profile enums in multiple tools

Testing

Matrix Tool Input:

{
  "coordinates": [
    {
      "longitude": -122.4194,
      "latitude": 37.7749
    },
    {
      "longitude": -122.2711,
      "latitude": 37.8044
    },
    {
      "longitude": -122.0322,
      "latitude": 37.3688
    }
  ],
  "profile": "mapbox/driving-traffic"
}

Matrix Tool Output

{
  "code": "Ok",
  "durations": [
    [
      0,
      1946.8,
      3461.1
    ],
    [
      1799.5,
      0,
      4021.6
    ],
    [
      3800.7,
      3993.3,
      0
    ]
  ],
  "sources": [
    {
      "name": "Market Street",
      "location": [
        -122.419449,
        37.774938
      ],
      "distance": 6.03530133
    },
    {
      "name": "Broadway",
      "location": [
        -122.271131,
        37.804412
      ],
      "distance": 3.036969011
    },
    {
      "name": "",
      "location": [
        -122.032044,
        37.368807
      ],
      "distance": 13.8394936
    }
  ],
  "destinations": [
    {
      "name": "Market Street",
      "location": [
        -122.419449,
        37.774938
      ],
      "distance": 6.03530133
    },
    {
      "name": "Broadway",
      "location": [
        -122.271131,
        37.804412
      ],
      "distance": 3.036969011
    },
    {
      "name": "",
      "location": [
        -122.032044,
        37.368807
      ],
      "distance": 13.8394936
    }
  ]
}

Directions Input:

{
  "method": "tools/call",
  "params": {
    "name": "directions_tool",
    "arguments": {
      "coordinates": [
        {
          "longitude": -73.9857,
          "latitude": 40.7484
        },
        {
          "longitude": -71.0589,
          "latitude": 42.3601
        }
      ],
      "routing_profile": "mapbox/driving-traffic",
      "geometries": "none",
      "alternatives": false
    },
    "_meta": {
      "progressToken": 2
    }
  }
}

Output:

{
  "content": [
    {
      "type": "text",
      "text": "{\n  \"routes\": [\n    {\n      \"duration\": 16927,\n      \"distance\": 359944,\n      \"leg_summaries\": [\n        \"I 84 East, I 90 East\"\n      ],\n      \"intersecting_admins\": [\n        \"USA\"\n      ],\n      \"notifications_summary\": [\n        \"Crossing the border of the states of US-NY and US-CT.\",\n        \"Crossing the border of the states of US-CT and US-NY.\",\n        \"The road leads through a tunnel.\",\n        \"Crossing the border of the states of US-CT and US-MA.\"\n      ],\n      \"incidents_summary\": [\n        {\n          \"type\": \"construction\",\n          \"end_time\": \"2026-11-27T04:59:59Z\",\n          \"long_description\": \"Right hand shoulder closed due to bridge maintenance work on I-684 both ways at Exit 6A NY-22.\",\n          \"impact\": \"low\",\n          \"affected_road_names\": [\n            \"I 684 North\"\n          ],\n          \"length\": 22\n        }\n      ],\n      \"num_legs\": 1,\n      \"congestion_information\": {\n        \"length_low\": 327555,\n        \"length_moderate\": 27314,\n        \"length_heavy\": 4214,\n        \"length_severe\": 0\n      },\n      \"average_speed_kph\": 89,\n      \"duration_under_typical_traffic_conditions\": 16934\n    }\n  ],\n  \"waypoints\": [\n    {\n      \"name\": \"West 33rd Street\",\n      \"snap_location\": [\n        -73.985894,\n        40.748135\n      ],\n      \"snap_distance\": 34,\n      \"time_zone\": {\n        \"identifier\": \"America/New_York\",\n        \"offset\": \"-05:00\",\n        \"abbreviation\": \"EST\"\n      }\n    },\n    {\n      \"name\": \"\",\n      \"snap_location\": [\n        -71.059463,\n        42.359938\n      ],\n      \"snap_distance\": 50,\n      \"time_zone\": {\n        \"identifier\": \"America/New_York\",\n        \"offset\": \"-05:00\",\n        \"abbreviation\": \"EST\"\n      }\n    }\n  ]\n}"
    }
  ],
  "structuredContent": {
    "routes": [
      {
        "duration": 16927,
        "distance": 359944,
        "leg_summaries": [
          "I 84 East, I 90 East"
        ],
        "intersecting_admins": [
          "USA"
        ],
        "notifications_summary": [
          "Crossing the border of the states of US-NY and US-CT.",
          "Crossing the border of the states of US-CT and US-NY.",
          "The road leads through a tunnel.",
          "Crossing the border of the states of US-CT and US-MA."
        ],
        "incidents_summary": [
          {
            "type": "construction",
            "end_time": "2026-11-27T04:59:59Z",
            "long_description": "Right hand shoulder closed due to bridge maintenance work on I-684 both ways at Exit 6A NY-22.",
            "impact": "low",
            "affected_road_names": [
              "I 684 North"
            ],
            "length": 22
          }
        ],
        "num_legs": 1,
        "congestion_information": {
          "length_low": 327555,
          "length_moderate": 27314,
          "length_heavy": 4214,
          "length_severe": 0
        },
        "average_speed_kph": 89,
        "duration_under_typical_traffic_conditions": 16934
      }
    ],
    "waypoints": [
      {
        "name": "West 33rd Street",
        "snap_location": [
          -73.985894,
          40.748135
        ],
        "snap_distance": 34,
        "time_zone": {
          "identifier": "America/New_York",
          "offset": "-05:00",
          "abbreviation": "EST"
        }
      },
      {
        "name": "",
        "snap_location": [
          -71.059463,
          42.359938
        ],
        "snap_distance": 50,
        "time_zone": {
          "identifier": "America/New_York",
          "offset": "-05:00",
          "abbreviation": "EST"
        }
      }
    ]
  },
  "isError": false
}

Checklist

  • Code has been tested locally
  • Unit tests have been added or updated
  • Documentation has been updated if needed

Additional Notes

@ctufts ctufts marked this pull request as ready for review January 7, 2026 22:05
@ctufts ctufts requested a review from a team as a code owner January 7, 2026 22:05
@ctufts ctufts merged commit c4b357d into main Jan 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants