This was generated by AI during triage.
Follow-up from #848 / ADR-0024 (#849). Filed as agreed during that triage; not yet specified.
After #848, the derived MCP query tool issues a bare read and so returns scalars plus foreign keys. That is the right default for a tool result — a five-level relation tree lands byte-for-byte in a context window — and relations stay reachable, because an assistant can follow a foreign key with a second tool call.
If assistants turn out to round-trip often enough for that to be the wrong trade, the fix is to let them ask: an include argument on the tool's input schema.
The part that needs thought before it's built: a caller-supplied include that names a relation deeper than the Access Filter can scope throws AccessScopeDepthExceededError. Coming from an assistant, that is a thrown error where a tool result was expected, so it needs to surface as something the model can recover from — an error result naming what it asked for and why it was refused, not a 500. Worth deciding at the same time whether the include should be depth-limited in the schema itself, so the common case is unreachable rather than caught.
Not urgent. Worth revisiting once there's real usage data on how assistants navigate related data through the tools.
Follow-up from #848 / ADR-0024 (#849). Filed as agreed during that triage; not yet specified.
After #848, the derived MCP
querytool issues a bare read and so returns scalars plus foreign keys. That is the right default for a tool result — a five-level relation tree lands byte-for-byte in a context window — and relations stay reachable, because an assistant can follow a foreign key with a second tool call.If assistants turn out to round-trip often enough for that to be the wrong trade, the fix is to let them ask: an
includeargument on the tool's input schema.The part that needs thought before it's built: a caller-supplied include that names a relation deeper than the Access Filter can scope throws
AccessScopeDepthExceededError. Coming from an assistant, that is a thrown error where a tool result was expected, so it needs to surface as something the model can recover from — an error result naming what it asked for and why it was refused, not a 500. Worth deciding at the same time whether the include should be depth-limited in the schema itself, so the common case is unreachable rather than caught.Not urgent. Worth revisiting once there's real usage data on how assistants navigate related data through the tools.