Who am I
- Permission required
- None: available to any valid key
When to use it
Returns the organization, person and key you are connected with, your effective permissions, the centres you can see and the tools available. Use it first, or when a tool denies access.
Input
No parameters.
Every tool also accepts lang (es | en) for the language of the text answer.
Output
| Field | Type | Description |
|---|---|---|
viaRequired | "key" | "session" | key = API key (mk_…), session = panel login |
organizationRequired | object | |
organization.idRequired | number | |
organization.nameRequired | string | |
organization.slugRequired | string | null | |
userRequired | object | null | The person the key acts as; null for service/agent keys |
credentialRequired | object | null | |
scopesRequired | string[] | |
capabilitiesRequired | string[] | Effective panel capabilities: the person's permissions ∩ key scopes ∩ organization modules |
location_scopeRequired | "all" | number[] | "all" or the centre ids you can see |
toolsRequired | string[] | Tools you can call with this key |
langRequired | "es" | "en" |
Examples
Example 1: Check which organization the key is connected to
Call
{
"name": "whoami",
"arguments": {}
}Response
{
"via": "key",
"organization": {
"id": 14,
"name": "Club Ejemplo",
"slug": "club-ejemplo"
},
"user": {
"id": 120,
"name": "Ana García",
"email": "ana@example.com"
},
"credential": {
"id": 3,
"name": "Claude de Ana",
"prefix": "k3x9a2b1",
"kind": "personal",
"expires_at": "2027-02-22T10:00:00.000Z"
},
"scopes": [
"ops:read"
],
"capabilities": [
"ops.planning.view",
"ops.absences.view"
],
"location_scope": [
2,
5
],
"tools": [
"whoami",
"usage",
"confirm_action"
],
"lang": "es"
}Equivalent JSON-RPC call (POST /mcp)
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "whoami",
"arguments": {}
}
}