Skip to main content
Glama

GetApiKeys

Read-onlyIdempotent

List the API keys and client-credential pairs of an organization. For each key: its ID, name, type, creation, expiry, last use, revocation time, and the resources it can access. For each client-credential pair (an OAuth client that authenticates with the client credentials grant): its client ID, name, creation time, creator, grant types, scopes, and the resources it can access. Key values and client secrets are never returned. Pass a key's ID to RenameApiKey or DeleteApiKey. Those tools do not work on pairs, so manage pairs in GraphOS Studio or with rover api-key. Provide the organization ID, which GetMyIdentity returns. Optionally filter keys by status (ACTIVE by default, or ALL, EXPIRED, REVOKED) and type (OPERATOR, SUBGRAPH, VARIANT, GATEWAY, SCIM). The filters do not apply to pairs. The two lists page separately: page keys with first and after, and pairs with pairsFirst and pairsAfter.

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": {
      "organizationId": "<organizationId>"
    },
    "name": "GetApiKeys"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNo
afterNo
firstNo
statusNo
pairsAfterNoThe cursor to start the page after.
pairsFirstNoThe maximum number of clients to return.
organizationIdYes

Output Schema

NameRequiredDescriptionDefault
dataNo
errorsNo
extensionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / data / properties / organization / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "apiKeys": {
      -        "description": "Returns a list of all active Operator, Subgraph, and SCIM API keys for the account. Org Admins can view all keys; Graph Admins can view only keys for graphs they administer.",
      -        "properties": {
      -          "nodes": {
      -            "description": "List of of API keys in the connection.",
      -            "items": {
      -              "properties": {
      -                "createdAt": {
      -                  "description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
      -                },
      -                "expiresAt": {
      -                  "anyOf": [
      -                    {
      -                      "description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "description": "The time when this API key expires, if applicable."
      -                },
      -                "id": {
      -                  "description": "The API key's ID.",
      -                  "oneOf": [
      -                    {
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "integer"
      -                    }
      -                  ]
      -                },
      -                "keyName": {
      -                  "anyOf": [
      -                    {
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "description": "The API key's name, for distinguishing it from other keys."
      -                },
      -                "keyType": {
      -                  "anyOf": [
      -                    {
      -                      "$ref": "#/definitions/GraphOsKeyType"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "description": "The type of API key (e.g., OPERATOR, SUBGRAPH, GATEWAY, SCIM)."
      -                },
      -                "lastUsed": {
      -                  "anyOf": [
      -                    {
      -                      "description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "description": "The timestamp when the API key was last used for authentication, if available."
      -                },
      -                "resources": {
      -                  "description": "Permissions associated with this API key, defining what actions it can perform.",
      -                  "items": {
      -                    "properties": {
      -                      "resourceId": {
      -                        "description": "The identifier of the resource that the key has access to.",
      -                        "type": "string"
      -                      },
      -                      "resourceType": {
      -                        "description": "The type of resource that the key has access to.",
      -                        "type": "string"
      -                      }
      -                    },
      -                    "required": [
      -                      "resourceType",
      -                      "resourceId"
      -                    ],
      -                    "type": "object"
      -                  },
      -                  "type": "array"
      -                },
      -                "revokedAt": {
      -                  "anyOf": [
      -                    {
      -                      "description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "description": "The time when this API key was revoked."
      -                }
      -              },
      -              "required": [
      -                "id",
      -                "createdAt",
      -                "resources"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "pageInfo": {
      -            "description": "Information about the pagination state of the connection.",
      -            "properties": {
      -              "endCursor": {
      -                "anyOf": [
      -                  {
      -                    "type": "string"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ],
      -                "description": "The cursor to use for fetching the previous page of items."
      -              },
      -              "hasNextPage": {
      -                "description": "Indicates if there are more items after the current page.",
      -                "type": "boolean"
      -              }
      -            },
      -            "required": [
      -              "hasNextPage"
      -            ],
      -            "type": "object"
      -          },
      -          "totalCount": {
      -            "description": "Total number of API keys in the connection, regardless of pagination.",
      -            "type": "integer"
      -          }
      -        },
      -        "required": [
      -          "totalCount",
      -          "pageInfo",
      -          "nodes"
      -        ],
      -        "type": "object"
      -      },
      -      "oauthClients": {
      -        "description": "The organization's `client_credentials` OAuth clients.",
      -        "properties": {
      -          "nodes": {
      -            "description": "The OAuth clients in this page, in the same order as `edges`.",
      -            "items": {
      -              "properties": {
      -                "clientId": {
      -                  "description": "The client's `client_id`, presented at the token endpoint.",
      -                  "oneOf": [
      -                    {
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "integer"
      -                    }
      -                  ]
      -                },
      -                "clientName": {
      -                  "anyOf": [
      -                    {
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "description": "The client's name, for distinguishing it from other clients."
      -                },
      -                "createdAt": {
      -                  "description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
      -                },
      -                "createdBy": {
      -                  "description": "The actor that registered this client.",
      -                  "properties": {
      -                    "actorId": {
      -                      "description": "The bare GraphOS actor id — no `user:`/`service:`/`identity:` prefix\n(that story is gone; see migration 0037). Named `actorId`, matching\nthe shared supergraph type's field name exactly (not `id`).",
      -                      "oneOf": [
      -                        {
      -                          "type": "string"
      -                        },
      -                        {
      -                          "type": "integer"
      -                        }
      -                      ]
      -                    },
      -                    "type": {
      -                      "$ref": "#/definitions/ActorType",
      -                      "description": "The kind of actor `actor_id` names. `r#type` renders as `type` on the\nwire — async-graphql strips the raw-identifier escape — matching this\nrepo's existing convention (see e.g. `PolicyRuleScope.r#type`)."
      -                    }
      -                  },
      -                  "required": [
      -                    "actorId",
      -                    "type"
      -                  ],
      -                  "type": "object"
      -                },
      -                "grantTypes": {
      -                  "description": "The grant types this client may use. A client may hold more than one.",
      -                  "items": {
      -                    "$ref": "#/definitions/OAuthGrantKind"
      -                  },
      -                  "type": "array"
      -                },
      -                "resources": {
      -                  "description": "The resources this client is restricted to.",
      -                  "items": {
      -                    "properties": {
      -                      "resourceId": {
      -                        "description": "The identifier of the resource the client is restricted to.",
      -                        "type": "string"
      -                      },
      -                      "resourceType": {
      -                        "description": "The type of resource the client is restricted to, such as `GRAPH`.",
      -                        "type": "string"
      -                      }
      -                    },
      -                    "required": [
      -                      "resourceType",
      -                      "resourceId"
      -                    ],
      -                    "type": "object"
      -                  },
      -                  "type": "array"
      -                },
      -                "scopes": {
      -                  "description": "The scopes that tokens issued to this client may carry.",
      -                  "items": {
      -                    "type": "string"
      -                  },
      -                  "type": "array"
      -                }
      -              },
      -              "required": [
      -                "clientId",
      -                "createdAt",
      -                "createdBy",
      -                "grantTypes",
      -                "scopes",
      -                "resources"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "pageInfo": {
      -            "description": "Pagination state for this connection.",
      -            "properties": {
      -              "endCursor": {
      -                "anyOf": [
      -                  {
      -                    "type": "string"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ],
      -                "description": "The cursor to pass as `after` for the next page. Usually the cursor of the last edge; for an empty page, the position the read reached, if any. Null when there is nothing to resume from."
      -              },
      -              "hasNextPage": {
      -                "description": "Whether another page exists after this one.",
      -                "type": "boolean"
      -              }
      -            },
      -            "required": [
      -              "hasNextPage"
      -            ],
      -            "type": "object"
      -          },
      -          "totalCount": {
      -            "anyOf": [
      -              {
      -                "type": "integer"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "description": "The total number of OAuth clients in the connection, regardless of pagination."
      -          }
      -        },
      -        "required": [
      -          "pageInfo",
      -          "nodes"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "apiKeys",
      -      "oauthClients"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "apiKeys": {
      +        "description": "Returns the account's Operator, Subgraph, SCIM, Gateway and Variant API keys as a paginated connection. `first` pages forward from the start or from `after`; `last` pages backward from `before`. A page holds at most 100 keys, which is also the default. Org Admins can view all keys; Graph Admins can view only keys for graphs they administer.",
      +        "properties": {
      +          "nodes": {
      +            "description": "List of of API keys in the connection.",
      +            "items": {
      +              "properties": {
      +                "createdAt": {
      +                  "description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
      +                },
      +                "expiresAt": {
      +                  "anyOf": [
      +                    {
      +                      "description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "description": "The time when this API key expires, if applicable."
      +                },
      +                "id": {
      +                  "description": "The API key's ID.",
      +                  "oneOf": [
      +                    {
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "integer"
      +                    }
      +                  ]
      +                },
      +                "keyName": {
      +                  "anyOf": [
      +                    {
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "description": "The API key's name, for distinguishing it from other keys."
      +                },
      +                "keyType": {
      +                  "anyOf": [
      +                    {
      +                      "$ref": "#/definitions/GraphOsKeyType"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "description": "The type of API key (e.g., OPERATOR, SUBGRAPH, GATEWAY, SCIM)."
      +                },
      +                "lastUsed": {
      +                  "anyOf": [
      +                    {
      +                      "description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "description": "The timestamp when the API key was last used for authentication, if available."
      +                },
      +                "resources": {
      +                  "description": "Permissions associated with this API key, defining what actions it can perform.",
      +                  "items": {
      +                    "properties": {
      +                      "resourceId": {
      +                        "description": "The identifier of the resource that the key has access to.",
      +                        "type": "string"
      +                      },
      +                      "resourceType": {
      +                        "description": "The type of resource that the key has access to.",
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "resourceType",
      +                      "resourceId"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                },
      +                "revokedAt": {
      +                  "anyOf": [
      +                    {
      +                      "description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "description": "The time when this API key was revoked."
      +                }
      +              },
      +              "required": [
      +                "id",
      +                "createdAt",
      +                "resources"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "pageInfo": {
      +            "description": "Information about the pagination state of the connection.",
      +            "properties": {
      +              "endCursor": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "description": "The cursor to use for fetching the previous page of items."
      +              },
      +              "hasNextPage": {
      +                "description": "Indicates if there are more items after the current page.",
      +                "type": "boolean"
      +              }
      +            },
      +            "required": [
      +              "hasNextPage"
      +            ],
      +            "type": "object"
      +          },
      +          "totalCount": {
      +            "description": "Total number of API keys in the connection, regardless of pagination.",
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "totalCount",
      +          "pageInfo",
      +          "nodes"
      +        ],
      +        "type": "object"
      +      },
      +      "oauthClients": {
      +        "description": "The organization's `client_credentials` OAuth clients.",
      +        "properties": {
      +          "nodes": {
      +            "description": "The OAuth clients in this page, in the same order as `edges`.",
      +            "items": {
      +              "properties": {
      +                "clientId": {
      +                  "description": "The client's `client_id`, presented at the token endpoint.",
      +                  "oneOf": [
      +                    {
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "integer"
      +                    }
      +                  ]
      +                },
      +                "clientName": {
      +                  "anyOf": [
      +                    {
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "description": "The client's name, for distinguishing it from other clients."
      +                },
      +                "createdAt": {
      +                  "description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
      +                },
      +                "createdBy": {
      +                  "description": "The actor that registered this client.",
      +                  "properties": {
      +                    "actorId": {
      +                      "description": "The bare GraphOS actor id — no `user:`/`service:`/`identity:` prefix\n(that story is gone; see migration 0037). Named `actorId`, matching\nthe shared supergraph type's field name exactly (not `id`).",
      +                      "oneOf": [
      +                        {
      +                          "type": "string"
      +                        },
      +                        {
      +                          "type": "integer"
      +                        }
      +                      ]
      +                    },
      +                    "type": {
      +                      "$ref": "#/definitions/ActorType",
      +                      "description": "The kind of actor `actor_id` names. `r#type` renders as `type` on the\nwire — async-graphql strips the raw-identifier escape — matching this\nrepo's existing convention (see e.g. `PolicyRuleScope.r#type`)."
      +                    }
      +                  },
      +                  "required": [
      +                    "actorId",
      +                    "type"
      +                  ],
      +                  "type": "object"
      +                },
      +                "grantTypes": {
      +                  "description": "The grant types this client may use. A client may hold more than one.",
      +                  "items": {
      +                    "$ref": "#/definitions/OAuthGrantKind"
      +                  },
      +                  "type": "array"
      +                },
      +                "resources": {
      +                  "description": "The resources this client is restricted to.",
      +                  "items": {
      +                    "properties": {
      +                      "resourceId": {
      +                        "description": "The identifier of the resource the client is restricted to.",
      +                        "type": "string"
      +                      },
      +                      "resourceType": {
      +                        "description": "The type of resource the client is restricted to, such as `GRAPH`.",
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "resourceType",
      +                      "resourceId"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                },
      +                "scopes": {
      +                  "description": "The scopes that tokens issued to this client may carry.",
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                }
      +              },
      +              "required": [
      +                "clientId",
      +                "createdAt",
      +                "createdBy",
      +                "grantTypes",
      +                "scopes",
      +                "resources"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "pageInfo": {
      +            "description": "Pagination state for this connection.",
      +            "properties": {
      +              "endCursor": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "description": "The cursor to pass as `after` for the next page. Usually the cursor of the last edge; for an empty page, the position the read reached, if any. Null when there is nothing to resume from."
      +              },
      +              "hasNextPage": {
      +                "description": "Whether another page exists after this one.",
      +                "type": "boolean"
      +              }
      +            },
      +            "required": [
      +              "hasNextPage"
      +            ],
      +            "type": "object"
      +          },
      +          "totalCount": {
      +            "anyOf": [
      +              {
      +                "type": "integer"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "The total number of OAuth clients in the connection, regardless of pagination."
      +          }
      +        },
      +        "required": [
      +          "pageInfo",
      +          "nodes"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "apiKeys",
      +      "oauthClients"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Added

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnly/idempotent annotations, it discloses security-relevant behavior (key values and client secrets are never returned), a filtering caveat (filters do not apply to pairs), and non-obvious structure (the two lists page independently with separate cursors). These are exactly the traits annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded and logically ordered (what it returns, then safety note, then routing, then filters, then paging), with no filler. The per-field enumeration of returned attributes is somewhat redundant with the output schema, slightly lengthening an otherwise tight definition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a seven-parameter, dual-list tool with a low-coverage schema, the description covers inputs, filtering, pagination, security behavior, and handoff to sibling tools, with no gaps an agent would need to guess at. Return values are also backed by an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 29%, but the description compensates fully: it gives the status values with the ACTIVE default (undocumented in the schema), the five type values, and explicitly maps first/after to keys versus pairsFirst/pairsAfter to pairs. All seven parameters gain meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and two distinct resources (API keys and client-credential pairs) scoped to an organization, then enumerates exactly what is returned for each. An agent can immediately distinguish it from CreateApiKey, RenameApiKey, and DeleteApiKey, which are named in the text.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing: key IDs go to RenameApiKey or DeleteApiKey, while pairs must be managed in GraphOS Studio or via `rover api-key` because those tools reject them. Also names GetMyIdentity as the source of the required organization ID and states which filters apply.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources