MCP Server type issue for single/multi select

Are you using our SaaS platform (Baserow.io) or self-hosting Baserow?

SaaS

What are the exact steps to reproduce this issue?

Use the MCP server, try to create or update a row that has a single select or multi select field, then when the MCP client provides an integer value for the single/multi select option the server rejects the create/update call, but when it provides the string value of that option, it works server side, but the schema validation of the input arguments of the tool call fail. For MCP clients that strictly validate the tool input arguments this leads to an impossibility of creating/updating rows with single/multi select fields.

Hey @rlamers, how does the tool call look like specifically for you, and which software are using to integrate with Baserow using the MCP?

When I was testing this with Claude, it was working as expected. However, I can see where this could go wrong because it accepts both an int and string as type. If an int is provided, then a lookup will be done on the select option ID, but if a string is provided, then on the name.

Maybe we can improve how this works from our side by including the option IDs in the property description of schema.

1 Like

This error came up in LangChain js as part of n8n. I think LangChain/LangGraph check the argument type matching.

The argument type of “entity_type” is strictly “integer” not “string”, so a stricter library will reject a string value.

Does that help?

Hey @rlamers, thanks for all the information provided here. I was able to solve two bugs related to it here Fix MCP select option bug (!3547) · Merge requests · Baserow / baserow · GitLab.

I quickly looked at the MR and I recall the MCP server actually not even accepting a correct integer ID for the option (I looked up the ID through using the frontend and finding option names having IDs in their ‘value’ property). Not sure if the MR addresses that, but would be good to test.

Yes, that will be addressed in this merge request. There was a problem in how the MCP tool forwards the request to the API. The data structure was wrong, causing integers to be converted to strings. This has been fixed.

I am experiencing the same problem - and PR is ready to merge. Could we just merge it? :smiley: