get_schema_for_collection
Retrieve a collection’s schema in a specified Couchbase bucket and scope by running INFER, with an option to include sample values per field.
Instructions
Get the schema for a collection in the specified scope. Returns a dictionary with the collection name and the schema returned by running INFER query on the Couchbase collection.
num_sample_values sets how many example values INFER reports per field. Leave it unset to use the server's own default (5). Pass 0 to omit sample values entirely, keeping only the structure and type information.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"bucket_name": "<bucket_name>",
"scope_name": "<scope_name>",
"collection_name": "<collection_name>"
},
"name": "get_schema_for_collection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope_name | Yes | ||
| bucket_name | Yes | ||
| collection_name | Yes | ||
| num_sample_values | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||