Schema Operations
Tools for retrieving JSON schemas that define ADO message structures.
Note: Schema tools support the optional
userIdparameter for session persistence. Include it in every call to maintain chain state across reconnections.
get_ado_schema
Get the actual JSON schema for an ADO type. This is the primary tool for understanding what parameters an ADO accepts.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
adoType | string | Yes | The ADO type (e.g., "cw721", "cw20", "splitter") |
schemaType | string | Yes | Type of schema: instantiate, execute, or query |
version | string | No | Specific version. Uses latest if not specified. |
subSchema | string | No | Specific sub-schema for execute/query operations |
page | number | No | Page number for paginated responses (default: 1) |
pageSize | number | No | Maximum tokens per page (default: 20000) |
Schema Types
- instantiate: Schema for creating a new ADO
- execute: Schema for executing transactions on an ADO
- query: Schema for querying data from an ADO
Example - Instantiate Schema
{
"adoType": "cw721",
"schemaType": "instantiate"
}Example - Execute Schema with Sub-Schema
{
"adoType": "primitive",
"schemaType": "execute",
"subSchema": "set-value.modifier"
}Pagination
For large schemas, the response may be paginated. The response includes metadata:
{
"pagination": {
"currentPage": 1,
"totalPages": 3,
"totalTokens": 45000,
"pageSize": 20000,
"hasMore": true
}
}Request subsequent pages by incrementing the page parameter.
get_ado_schema_url
Get only the URL for an ADO schema without fetching the data. This is a lightweight call useful when you just need the schema location.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
adoType | string | Yes | The ADO type |
schemaType | string | Yes | Type of schema: instantiate, execute, or query |
version | string | No | Specific version. Uses latest if not specified. |
Example
{
"adoType": "cw721",
"schemaType": "instantiate"
}Response
Returns the URL where the schema can be fetched.
get_ado_response_schema
Get the JSON schema for an ADO query response. This helps you understand what data structure a query will return.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
adoType | string | Yes | The ADO type (e.g., "cw721", "cw20", "splitter") |
queryOperation | string | Yes | The query operation name (e.g., "get-value.query", "balance.query") |
version | string | No | Specific version. Uses latest if not specified. |
Example
{
"adoType": "cw721",
"queryOperation": "owner-of.query"
}Response
Returns the JSON schema describing the response structure for the specified query.