Skip to content

[Bug]: Field descriptions cannot handle a comma in the string #3460

@ErikLormans

Description

@ErikLormans

What happened?

Hi All,

I am setting up a Proof of Concept that uses the MCP functionality of Data API Builder. An important, maybe even crucial part of this, is having clear descriptions of the tables and it's fields. So that the LLM can understand what data is available, how it is interconnected, and in what scenarios it makes sense to query or filter.

To achieve that I am following these guidelines.

Unfortunately I am running into a small issue here. I noticed that when adding a description for a table, using a command like this dab add Orders \ --source dbo.Orders \ --permissions "authenticated:read" \ --description "Customer purchase orders with line items, shipping details, and payment status" it can handle comma's. The dab-config.json gets updated with this full description.

However, when I add field descriptions using commands like this dab update Products --fields.name "RecordIsActive" --fields.description "Indicates whether the record is active. When false, the record may be historical and still exist, but is no longer actively used. Type: boolean" the dab-config.json is updated with a description. But only the part of the description up to the first comma! The result in dab-config.json is

{
"name": "RecordIsActive",
"description": "Indicates whether the record is active. When false",
"primary-key": false
}

It looks like --fields.description is not able to handle comma's. When I remove the comma's from the description and rerun the command, the dab-config.json does get updated with the full description.

It looks like a small bug that is easy to overlook but can have a big impact in how well the agent/LLM performs.

I have seen this behaviour in both the latest officially released version 1.7.93 and the latest release-candidate 2.0.0-rc.

It would be great if this can be fixed.

Kind regards,

Erik Lormans

Version

1.7.93 and 2.0.0-rc

What database are you using?

Azure SQL

What hosting model are you using?

AppService

Which API approach are you accessing DAB through?

MCP

Relevant log output


Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Labels

bugSomething isn't workingcriCustomer Reported issuetriageissues to be triaged

Type

No type

Projects

Status

In Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions