You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(plugin-mcp): add depth parameter support to all MCP find resource tools (#14931)
### What
Adds `depth` parameter support to MCP resource tools (find and create),
allowing MCP clients to control relationship population depth when
querying or creating documents.
### Why
MCP clients currently have no way to control how deeply relationships
are populated when retrieving or creating documents. When collections
have relationship fields, agents need the ability to either:
- Get just the IDs (depth=0) for lightweight responses
- Get fully populated relationship data (depth=1+) for richer context
This can significantly reduce the token count when reading documents.
### How
- Added `depth` parameter to `findResources` and `createResource`
schemas in schemas.ts
- Updated `find.ts` to pass `depth` to both `payload.find()` and
`payload.findByID()` calls
- Updated `create.ts` to pass `depth` to `payload.create()` call
- Parameter is an optional integer (0-10) with default of 0
- Added integration tests
---------
Co-authored-by: Kendell Joseph <kjoseph@figma.com>
0 commit comments