Perform CRUD operations on a Weaviate multi-tenant collection with correct tenant routing
domain: docs.weaviate.io/weaviate/manage-collections/multi-tenancy · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Always pass the tenant name when inserting objects: collection.with_tenant('tenant_a').data.insert({'text': 'hello'})
For batch inserts wrap each object with the tenant identifier to route writes to the correct shard
Query with tenant context: collection.with_tenant('tenant_a').query.near_text(query='hello', limit=5) — results are strictly scoped to that tenant's shard
Delete objects by UUID scoped to the tenant: collection.with_tenant('tenant_a').data.delete_by_id(uuid)
Update objects similarly with the tenant context — cross-tenant writes are rejected with an authorization error
Validate tenant existence before CRUD operations to surface configuration errors early rather than at query time
Known gotchas
Omitting the tenant name on a multi-tenant collection raises an error — there is no default or fallback shard
Cross-tenant search is not supported in a single request; if you need to aggregate across tenants you must issue one request per tenant and merge client-side
Tenant names are case-sensitive and immutable after creation; establish a naming convention (e.g. lowercase UUIDs) before production onboarding
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?