Skip to content

Fix name fallback for Archestra get tools#3223

Open
yodakohl wants to merge 4 commits intoarchestra-ai:mainfrom
yodakohl:codex/fix-3214-get-tools-name-fallback
Open

Fix name fallback for Archestra get tools#3223
yodakohl wants to merge 4 commits intoarchestra-ai:mainfrom
yodakohl:codex/fix-3214-get-tools-name-fallback

Conversation

@yodakohl
Copy link

@yodakohl yodakohl commented Mar 9, 2026

/claim #3214

Fixes the shared get-tool path so get_mcp_gateway, get_agent, and get_llm_proxy no longer crash when the caller passes a human-readable name in id.

What changed:

  • added UUID validation before AgentModel.findById
  • non-UUID id values now fall back to the existing personal-agent name search path
  • added regression tests for all three shared tool variants

Why:

  • the current shared handler passes args.id straight into a UUID lookup
  • when the model supplies a name like n8n workflow: Grafana exporter, PostgreSQL rejects the UUID comparison and the user gets a generic unexpected error

@CLAassistant
Copy link

CLAassistant commented Mar 9, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 3 committers have signed the CLA.

✅ iskhakov
❌ Codex
❌ yodakohl


Codex seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@London-Cat
Copy link
Collaborator

London-Cat commented Mar 9, 2026

📊 Reputation Summary

User Rep Pull Requests Activity Assigned Core Reactions
iskhakov ⚡ 1810 77✅ 0🔄 23❌ 100 issues, 50 comments 3
yodakohl ⚡ 3 0✅ 1🔄 0❌ 0 issues, 1 comments 1
CLAassistant ⚡ 0 0✅ 0🔄 0❌ 0 issues, 50 comments 0

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

@iskhakov
Copy link
Contributor

iskhakov commented Mar 9, 2026

could you please add an input parameter to search by name?

Copy link
Contributor

@joeyorlando joeyorlando left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey 👋 thanks for the contribution - one small comment about reusability of the util function

Comment on lines +89 to +94
function isUuid(value: string): boolean {
return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(
value,
);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mind extracting isUuid (backend/src/models/interaction.ts) and isValidUUID (backend/src/routes/chatops.ts) out into a shared util and reusing in those three spots?

@iskhakov
Copy link
Contributor

Assigned the issue to you, could you please providea quick screencast where all that tools are functional, as per issue description:

Please send a video demo with the chat where you test all archestra__ tools

@iskhakov
Copy link
Contributor

there is linting issue in the code:

[biome] tests/ui/mcp-install.spec.ts format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[biome] 
[biome]   ✖ File content differs from formatting output
[biome]   
[biome]     350 350 │   
[biome]     351 351 │       // Force manual reinstall by adding a prompted env var
[biome]     352     │ - ····await·settingsDialog
[biome]     353     │ - ······.getByRole("button",·{·name:·"Add·Variable"·})
[biome]     354     │ - ······.click();
[biome]     355     │ - ····await·settingsDialog
[biome]     356     │ - ······.getByPlaceholder("API_KEY")
[biome]     357     │ - ······.first()
[biome]     358     │ - ······.fill("E2E_PROMPT");
[biome]         352 │ + ····await·settingsDialog.getByRole("button",·{·name:·"Add·Variable"·}).click();
[biome]         353 │ + ····await·settingsDialog.getByPlaceholder("API_KEY").first().fill("E2E_PROMPT");
[biome]     359 354 │       await settingsDialog
[biome]     360 355 │         .getByTestId(E2eTestId.PromptOnInstallationCheckbox)
[biome]   
[biome] 
[biome] ci ━━━━━━━Checked 68 files in 187ms. No fixes applied.
[biome] Found 1 error.
[biome] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[biome] 
[biome]   ✖ Some errors were emitted while running checks.
[biome]   

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.

5 participants