MCPDocumentation
On this page

Core

Who am I

whoami
Read
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

FieldTypeDescription
viaRequired"key" | "session"key = API key (mk_…), session = panel login
organizationRequiredobject
organization.idRequirednumber
organization.nameRequiredstring
organization.slugRequiredstring | null
userRequiredobject | nullThe person the key acts as; null for service/agent keys
credentialRequiredobject | null
scopesRequiredstring[]
capabilitiesRequiredstring[]Effective panel capabilities: the person's permissions ∩ key scopes ∩ organization modules
location_scopeRequired"all" | number[]"all" or the centre ids you can see
toolsRequiredstring[]Tools you can call with this key
langRequired"es" | "en"

Examples

Example 1: Check which organization the key is connected to

Call

JSON
{
  "name": "whoami",
  "arguments": {}
}

Response

JSON
{
  "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)

JSON
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "whoami",
    "arguments": {}
  }
}