From arize-toolkit-dev
Queries and analyzes Arize ML observability data via GraphQL using curl. Fetches schema, builds, executes, and debugs queries/mutations for spaces, models, monitors, datasets.
npx claudepluginhub duncankmckinnon/arize_toolkit --plugin arize-toolkit-devThis skill uses the workspace's default tool permissions.
Query and analyze data from the Arize ML observability platform using GraphQL via curl.
Guides adding new GraphQL queries/mutations to Arize Toolkit via phased workflow: schema exploration, models/types generation, tests, client methods, docs. For arize_toolkit API extensions.
Manages Arize ML platform resources like models, monitors, prompts, evaluators, dashboards, spaces via arize_toolkit CLI. Lists, creates, updates, deletes resources, configures profiles, handles admin tasks from terminal.
Optimizes, improves, and debugs LLM prompts using Arize production trace data, evaluations, annotations, and ax CLI. Extracts prompts from OpenInference spans and runs data-driven optimization loops.
Share bugs, ideas, or general feedback.
Query and analyze data from the Arize ML observability platform using GraphQL via curl.
1. Check API Key → 2. Fetch Full Schema → 3. Build Query/Mutation → 4. Execute → 5. Summarize
CRITICAL: Always fetch the full schema FIRST before building any queries. This ensures accuracy.
echo "${ARIZE_API_KEY:-NOT_SET}"
Ask the user for their API key:
"To query the Arize GraphQL API, I need your API key. You can find it in Arize: Settings → API Keys."
Then set it:
export ARIZE_API_KEY="user-provided-key"
Verify:
curl -s -X POST "${ARIZE_GRAPHQL_ENDPOINT:-https://app.arize.com/graphql}" \
-H "Content-Type: application/json" \
-H "x-api-key: ${ARIZE_API_KEY}" \
-d '{"query": "{ __typename }"}'
Expected: {"data":{"__typename":"Query"}}
Use this comprehensive introspection query to get the complete schema. This query uses fragments to capture all type information including nested types up to 10 levels deep.
curl -s -X POST "${ARIZE_GRAPHQL_ENDPOINT:-https://app.arize.com/graphql}" \
-H "Content-Type: application/json" \
-H "x-api-key: ${ARIZE_API_KEY}" \
-d @- <<'EOF'
{
"query": "query IntrospectionQuery { __schema { queryType { name } mutationType { name } subscriptionType { name } types { ...FullType } directives { name description locations args { ...InputValue } } } } fragment FullType on __Type { kind name description fields(includeDeprecated: true) { name description args { ...InputValue } type { ...TypeRef } isDeprecated deprecationReason } inputFields { ...InputValue } interfaces { ...TypeRef } enumValues(includeDeprecated: true) { name description isDeprecated deprecationReason } possibleTypes { ...TypeRef } } fragment InputValue on __InputValue { name description type { ...TypeRef } defaultValue } fragment TypeRef on __Type { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name } } } } } } } } } }"
}
EOF
The introspection returns:
| Kind | Description | Example |
|---|---|---|
SCALAR | Primitive types | String, Int, ID, Boolean, Float |
OBJECT | Complex types with fields | Space, Model, Monitor |
INPUT_OBJECT | Input types for mutations | CreateMonitorInput |
ENUM | Enumeration types | ModelType, MonitorStatus |
LIST | Array wrapper | [Model] |
NON_NULL | Required wrapper | String! |
INTERFACE | Shared field contract | Node |
UNION | One of multiple types | SearchResult |
When kind is NON_NULL or LIST, the actual type is in ofType. Keep unwrapping until you reach a named type:
NON_NULL → LIST → NON_NULL → OBJECT(Model)
means: [Model!]!
Using the schema, construct the appropriate operation.
See references/PATTERNS.md for detailed patterns.
curl -s -X POST "${ARIZE_GRAPHQL_ENDPOINT:-https://app.arize.com/graphql}" \
-H "Content-Type: application/json" \
-H "x-api-key: ${ARIZE_API_KEY}" \
-d '{"query": "{ spaces { edges { node { id name } } } }"}'
curl -s -X POST "${ARIZE_GRAPHQL_ENDPOINT:-https://app.arize.com/graphql}" \
-H "Content-Type: application/json" \
-H "x-api-key: ${ARIZE_API_KEY}" \
-d @- <<'EOF'
{
"query": "mutation CreateSpace($input: CreateSpaceInput!) { createSpace(input: $input) { space { id name } } }",
"variables": {
"input": {
"name": "My Space",
"organizationId": "org-id-here"
}
}
}
EOF
Parse the JSON response and provide clear insights to the user.
All lists use edges/node pattern:
{
spaces {
edges {
node { id name }
cursor
}
pageInfo { hasNextPage endCursor }
}
}
{
node(id: "BASE64_ID") {
... on Space { name }
... on Model { name modelType }
}
}
{ spaces(first: 10, after: "cursor") { edges { node { id } } } }
mutation Op($input: InputType!) {
mutationName(input: $input) {
entity { id }
errors { field message }
}
}
When helping users write queries (without executing):
| Error | Solution |
|---|---|
401 Unauthorized | Invalid/expired API key |
Field doesn't exist | Check schema for correct field name |
Cannot query field on type | Use inline fragment for interfaces |
| Parse errors | Check JSON escaping in curl |