Schemagate library offers zero-import tools to filter database schema for AI agents
A developer built Schemagate, a Python library designed to restrict which database tables an AI agent can see based on the caller's permissions. The core problem it addresses is that agents often expose schema objects users are not authorized to access, and wiring a fix into an existing agent takes significant effort. To lower adoption friction, the library now offers five interfaces — including a CLI demo, a select command, and a local studio UI — that require no Python imports at all. In benchmark tests, the tool reduced average prompt size by 75.6%, selecting around 9 relevant objects from a 42-object schema instead of passing the entire schema to the model. A browser-based version running on six bundled schemas is also publicly available, with a JavaScript port of the selector validated against 1,789 test cases to match the Python version exactly.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in