Skip to content

Tools API

The Tools API lets you call any MCP tool directly, bypassing the agent loop. This is the same mechanism the MCP App Bridge uses to proxy tool calls from app iframes.

Invoke a tool on a specific MCP server. The tool executes immediately and returns the result.

Request body:

FieldTypeRequiredDescription
serverstringYesMCP server name (e.g., weather)
toolstringYesTool name on that server (e.g., get_forecast)
argumentsobjectNoInput arguments for the tool. Defaults to {}.

Response:

{
"result": {
"temp": 62,
"condition": "partly cloudy",
"humidity": 78
},
"isError": false
}
FieldTypeDescription
resultunknownTool output. Parsed as JSON if the output is valid JSON, otherwise returned as a string.
isErrorbooleantrue if the tool reported an error

Error responses:

StatuserrorCondition
400bad_requestMissing server or tool field
404tool_not_foundServer does not exist, or tool not found on the server

Examples:

Terminal window
curl -X POST http://localhost:27247/v1/tools/call \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-secret-key" \
-d '{
"server": "weather",
"tool": "get_forecast",
"arguments": { "city": "San Francisco" }
}'

NimbleBrain includes built-in system tools (prefixed with nb__) for platform management. These are always available and do not require any bundle to be installed.

Get platform status information. Use the scope parameter to control what’s returned.

InputTypeDescription
scopestring"overview" (default), "bundles", "skills", or "config"

Unified search across installed tools and the mpak registry.

InputTypeDescription
querystringSearch query
scopestring"tools" (installed tools) or "registry" (mpak bundles)

Update model selection and runtime limits. Writes atomically to nimblebrain.json. Admin only.

InputTypeDescription
modelsobjectRole-based model slots: default, fast, reasoning. Each maps to a provider:model-id string.
defaultModelstringDefault model ID (deprecated — use models.default).
maxIterationsnumberMax agentic iterations per request (1—25).
maxInputTokensnumberMax input tokens per request.
maxOutputTokensnumberMax output tokens per LLM call.

Set user preferences. Triggered when the user says their name, asks to change timezone/language/theme, or says “call me X”.

InputTypeDescription
displayNamestringUser’s display name (e.g., “Matt”).
timezonestringIANA timezone (e.g., “Pacific/Honolulu”).
localestringBCP 47 locale (e.g., “en-US”).
themestringColor theme: "system", "light", or "dark".

Returns the updated preferences object on success.

Install, uninstall, or configure an app. Gated by the bundleManagement feature flag.

InputTypeDescription
actionstring"install", "uninstall", or "configure"
namestringBundle name (e.g., @nimblebraininc/tasks)

Create, edit, or delete user skills. Gated by the skillManagement feature flag.

InputTypeDescription
actionstring"create", "edit", or "delete"
namestringSkill name

Spawn a child agent for sub-tasks. Gated by the delegation feature flag. See Multi-Agent Delegation for details.

InputTypeDescription
taskstringTask description for the child agent
toolsstring[]Tool glob patterns the child can access
agentstringNamed agent profile from config (optional)

Generate a personalized activity briefing for the workspace. Uses the fast model slot. Results are cached per the home.cacheTtlMinutes config value.

InputTypeDescription
force_refreshbooleanBypass cache and regenerate. Default: false.

Returns a briefing with greeting, lede, and sections categorized as needs_attention, recent, or coming_up. Used by the Home dashboard on the landing page.

Create or delete workspace users. Admin only. Gated by the userManagement feature flag.

Workspace CRUD, member management, and conversation sharing. Admin only. Gated by the workspaceManagement feature flag.

The API constructs the fully qualified tool name by joining the server and tool with a double underscore: {server}__{tool}. For example, server weather and tool get_forecast resolves to weather__get_forecast internally.

The web client uses this endpoint as the backend for the MCP App Bridge. When an app iframe calls a tool via postMessage, the bridge proxies the request to POST /v1/tools/call.

The audit log records every tool call made through this endpoint:

[api] tools/call server=weather tool=get_forecast

Returns the shell configuration for the current workspace, including sidebar placements and available endpoints. The web client uses this to render navigation.

Response:

{
"placements": [...],
"endpoints": {...}
}

Serve a previously uploaded file. Returns the file content with the appropriate Content-Type header.

Error responses:

StatusCondition
404File not found