Shazil Khan

Open source

Valid MCP tool names without losing their identity.

Reproduced provider failures caused by invalid MCP function names and built a deterministic name-normalization patch with regression tests. Pushed the patch to a fork.

Project
AnythingLLM MCP patch
My role
Open-source patch author
AnythingLLM MCP patch — public repository view
Public repository viewOpen full image

The problem.

MCP server and tool names can contain characters or lengths that native tool-calling providers reject.

My role.

I reproduced invalid-name cases and authored a deterministic normalisation patch.

What I built.

Deterministic mapping

I preserved valid names and normalised invalid ones, adding a hash suffix when needed to keep names distinct within the length limit.

Tool resolution

I used the same mapping when resolving selected tools so interface identifiers and provider names remain connected.

Regression tests

I added tests that fail on the original code and pass with the patch.

The results.

The tested patch was pushed to a fork. An upstream issue or merged pull request was not established in the recorded status.

Scope & credits

Open-source patch author

Next case study

Antirion gateway fixes

Open source

Let’s talk about your project

What are you
building next?

A new website. A product taking shape. A workflow that could work better.

Tell me what you have in mind, what you want to change, and the timeline you’re working toward.

shazil@shazil.tech

You’ll be talking directly with me.

Connect on LinkedIn