Skip to content

fix: handle non-UUID id in get_mcp_gateway and related get tools#3222

Open
kevinpsj0 wants to merge 1 commit intoarchestra-ai:mainfrom
kevinpsj0:fix/get-mcp-gateway-uuid-validation
Open

fix: handle non-UUID id in get_mcp_gateway and related get tools#3222
kevinpsj0 wants to merge 1 commit intoarchestra-ai:mainfrom
kevinpsj0:fix/get-mcp-gateway-uuid-validation

Conversation

@kevinpsj0
Copy link

@kevinpsj0 kevinpsj0 commented Mar 9, 2026

Problem

When Claude calls archestra__get_mcp_gateway (or get_agent get_llm_proxy) with a descriptive name as the id parameter instead of a UUID, PostgreSQL throws a cast error and it surfaces as an unhandled crash.

As shown in #3214, Claude naturally tries id: 'n8n workflow: Grafana exporter' a valid human intent but not a UUID.

Fix

Added UUID format validation before calling indById. If the id parameter doesn't match UUID format, the handler now falls back to a name search (same logic as the existing
ame parameter path rather than crashing.

^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

This fix applies to all three tools that share this handler: get_mcp_gateway, get_agent, and get_llm_proxy.

/claim #3214

When Claude passes a name string as the id parameter (e.g. 'n8n workflow:
Grafana exporter'), PostgreSQL throws a cast error because the column
expects a UUID. Instead of crashing, fall back to a name search when the
id doesn't match UUID format.

Fixes archestra-ai#3214
@CLAassistant
Copy link

CLAassistant commented Mar 9, 2026

CLA assistant check
All committers have signed the CLA.

@London-Cat
Copy link
Collaborator

London-Cat commented Mar 9, 2026

📊 Reputation Summary

User Rep Pull Requests Activity Assigned Core Reactions
kevinpsj0 ⚡ 3 0✅ 1🔄 0❌ 0 issues, 0 comments 0
CLAassistant ⚡ 0 0✅ 0🔄 0❌ 0 issues, 50 comments 0

How is the score calculated? Read about it in the Reputation Bot repository 🤖

@kevinpsj0
Copy link
Author

kevinpsj0 commented Mar 10, 2026

Hi @iskhakov, we weren't able to provide a video demo because the quickstart environment requires additional MCP server configuration.

The bug: When Claude calls archestra__get_mcp_gateway (or get_agent / get_llm_proxy) with a descriptive string as the id parameter, PostgreSQL throws a UUID cast error because the column expects a UUID.

The fix: We added a UUID regex check before calling findById. If id doesn't match the UUID format, the handler falls back to the existing name-based search logic instead of crashing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants