# exact-match lookup + slug audit — artlu-tracker-mcp

Audited all 58 tracker projects and patched a day-1 substring-match bug in the MCP that had been silently picking the wrong project when a name was a substring of others.

Type: project entry

Published: 2026-04-30

[Original page](<https://artlu.ai/project/exact-match-lookup-slug-audit-artlu-tracker-mcp>)

[Browse this group](<https://artlu.ai/ai/groups/artlu.md>)

Parent project: artlu.ai

Recorded status: launched

Updated: 2026-09-16T16:22:28.373Z

Technologies: TypeScript, Node.js, MCP, Firebase Admin, Firestore

## Details

**What shipped**

Two things, one cleanup pass.

**The audit.** Ran a sweep across all 58 projects in the artlu.ai tracker. 14 had no slug field at all — the auto-slug helper was added in April but never backfilled the older entries. 3 more had stale slugs that no longer matched their names, including one whose slug still said "control-surface" because the project had been renamed to "dashboard" months ago and the slug never followed. Fixed all 17 via the MCP's `update_project` tool.

**The bug it exposed.** Got to a project literally named `artlu.ai` and the MCP confidently updated a different one — the homepage-showcase project whose name ends with `— artlu.ai`. The response text named the wrong project, which is how we caught it. Reverted, dug in.

Root cause: `get_project` and `update_project` both used pure substring match — `name.toLowerCase().includes(query.toLowerCase())`. Nine projects in the tracker contain `artlu.ai` as a substring (`— artlu.ai`, `— artlu.ai v2`, etc). The matcher returned the first hit in Firestore document-id order. The doc id of the real `artlu.ai` project is `mE3rAaf8IZqxEn4t3Rj4`. Homepage-showcase is `4EdEwKBbJWejkxwv8WVw`. `4` < `m` alphabetically — homepage-showcase always won.

Couldn't even use the MCP to verify the real artlu.ai's slug (same collision). Wrote a 6-line Node script using Firebase Admin to read the doc by id directly, just to confirm it already had the right slug.

**The fix.** Added a `findProjectDoc()` helper — first tries exact (case-insensitive) name match, falls back to substring if no exact hit. Patched both tools. ~10 lines of code. `npm run build`, restart Claude, verify. `get_project("artlu.ai")` now returns the real project.

**The meta beat.** The bug had been in the MCP since day 1. Never bit me until today. It took a project whose entire name was a substring of several others to trigger.

Also updated `artlu-tracker-mcp/README.md` tools table and the cross-project `artlu-knowledge-base/context.md` with the fix notes alongside the existing slug auto-gen entry.

## Related build notes

[the tool i built to update my projects updated the wrong one](<https://artlu.ai/ai/log/day-44-the-tool-i-built-to-update-my-projects-updated-the-wrong-one.md>)


Status and dates describe the published record, not a recent test of an external service. Missing details are not inferred. Public links do not imply an open-source licence or permission to reuse material.

[Directory](<https://artlu.ai/llms.txt>)
