Tool Discovery and Testing
Retrieve the complete permission-aware LeenOps tool catalog and test hosted MCP calls.
LeenOps exposes a broad, versioned tool catalog. A specific API key sees only the subset allowed by its effective permissions. Always retrieve the live catalog instead of relying on a cached tool count.
The Workspace 2026-08-05 registry contains 427 tools across 37 feature groups, including 22 Documents tools and 25 Contracts tools. Live discovery remains authoritative because permissions and later releases can change what a key sees.
The hosted discovery API is the source of truth for:
- Tool names and descriptions
- Read/write classification
- Feature group
- Required permission and legacy permission aliases
- Whether the tested key is allowed to call the tool
- JSON input schema
Verify the session
curl "https://workspace.leenops.com/api/mcp/session" \
-H "Authorization: Bearer $WORKESTRA_API_KEY"Response:
{
"ok": true,
"apiKeyName": "Codex MCP",
"workspaceId": "workspace-uuid",
"principal": {
"id": "principal-uuid",
"type": "service",
"displayName": "Codex MCP"
},
"delegation": {
"mode": "service_principal"
},
"permissions": {
"granted": ["read_contacts"],
"allKnown": ["read_contacts", "create_contacts"]
},
"capabilities": {
"totalTools": 120,
"allowedToolCount": 42,
"deniedToolCount": 78,
"allowedToolNames": ["...permission-dependent tool names..."],
"allowedFeatures": ["...permission-dependent feature groups..."]
}
}The total reflects the deployed registry. Allowed/denied counts and names are illustrative and depend on the tested key.
List tools
GET /api/mcp/tools/list
Authorization: Bearer lnp_...Query parameters:
| Parameter | Default | Meaning |
|---|---|---|
includeDenied | false | Include tools the key cannot call |
includeSchemas | true | Include each tool's JSON input schema |
readOnly | false | Filter out write tools |
features | all | Comma-separated feature groups |
Complete audit request:
curl "https://workspace.leenops.com/api/mcp/tools/list?includeDenied=true&includeSchemas=true" \
-H "Authorization: Bearer $WORKESTRA_API_KEY"Read-only CRM subset:
curl "https://workspace.leenops.com/api/mcp/tools/list?readOnly=true&features=contacts,deals,companies" \
-H "Authorization: Bearer $WORKESTRA_API_KEY"POST /api/mcp/tools/list accepts the same options as JSON:
{
"includeDenied": true,
"includeSchemas": true,
"readOnly": false,
"features": ["contacts", "deals"]
}Call a tool directly
POST /api/mcp/tools/call
Authorization: Bearer lnp_...
Content-Type: application/json{
"name": "search_contacts",
"arguments": {
"query": "Acme"
}
}Use the input schema returned by /tools/list; do not guess argument names.
Success:
{
"data": {},
"entities": [
{
"entity_type": "contact",
"entity_id": "contact-uuid"
}
]
}Feature groups
Feature groups span CRM, projects, support, finance, people, scheduling,
operations, reporting, and automation. Use the allowedFeatures and
allowedToolNames returned for the current credential as the authoritative
inventory. This avoids stale integrations as tools are added or permissions
change.
Domain catalogs:
Examples:
GET /api/mcp/tools/list?features=documents&includeSchemas=true
GET /api/mcp/tools/list?features=contracts&includeSchemas=trueRate limits
The session, list, and call endpoints currently enforce:
- 600 requests/minute per source IP
- 600 requests/minute per workspace
On 429, honor Retry-After and the X-RateLimit-* headers.
Errors
| Status | Meaning |
|---|---|
400 | Invalid JSON or arguments (invalid_arguments) |
401 | Missing, invalid, inactive, or expired API key |
403 | Permission missing, trial restriction, or a person-bound tool needs explicit delegation |
404 | Unknown tool name |
409 | Record state or revision conflict |
429 | IP/workspace rate limit or agent-trial quota reached |
500 | Safe tool_execution_failed; report the response request ID |
Tool-call errors include a stable code, a safe message, and requestId.
The same request ID is returned as X-Request-Id. Refresh the live schema for
invalid_arguments; enable optional delegation only for
human_delegation_required. Raw database or provider errors are not exposed.
Agent-trial differences
Agent-trial keys:
- Use a guarded tool allowlist.
- Exclude high-risk external side effects and administrative capabilities.
- Expire after seven days under the current contract.
- Are capped at 250 tool calls under the current contract.
Always trust /api/mcp/session and /api/mcp/tools/list for the actual tested
credential.
For unresolved permission or schema discrepancies, follow API and MCP Troubleshooting or email support@leenops.com with the tool name, adapter version, workspace ID, and sanitized response. Never send the key.
Testing checklist
- Pin or record the
workestra-mcpnpm version. - Confirm
/api/mcp/sessionsucceeds. - Store the returned
allowedToolNames. - Retrieve schemas with
/api/mcp/tools/list. - Call a read tool with known-safe arguments.
- Verify a denied or unknown tool fails as expected.
- Test one disposable write only after confirming the permission and cleanup path.
- Revoke the temporary key after testing.

