Skip to main content
CodeCall exposes four meta-tools that replace direct tool access. This page documents the complete API for each tool with request/response schemas and examples.

codecall:search

Search for tools by natural language query using semantic embeddings.

Request Schema

Response Schema

Examples

Response Example

Search Strategy

CodeCall supports two embedding strategies:

codecall:describe

Get detailed schemas and documentation for specific tools.

Request Schema

Response Schema

usageExamples returns up to 5 entries per tool. Each entry has a description and a code snippet that calls the tool via callTool(...) so the LLM can copy the pattern directly into a codecall:execute script.

Example

Security Note

codecall:describe will not return information about CodeCall meta-tools themselves. Attempting to describe codecall:execute returns the tool in notFound.

codecall:execute

Execute a JavaScript (AgentScript) plan that orchestrates multiple tools.

Request Schema

Response Schema

Success:
Error Responses:

Example

AgentScript Guide

For the complete scripting API (callTool, getTool, codecallContext, __safe_parallel), error handling patterns, and best practices, see the dedicated AgentScript guide.

codecall:invoke

Direct tool invocation without JavaScript execution. Useful for simple single-tool calls.

Request Schema

Response Schema

codecall:invoke returns the standard MCP CallToolResult — the same envelope a direct tools/call produces. Errors are surfaced via isError: true plus a textual content entry; there is no separate { status, error } wrapper. Success:
Error:

Example

When to Use Invoke vs Execute


Error Codes Reference

Script Execution Errors


Error Handling

For error handling patterns including retry, fallback, and partial success strategies, see the AgentScript Guide.

Debugging Guide

Using console.log

Interpreting Error Messages

Cause: Loop ran more than maxSteps times Fix: Use pagination or filter data before looping
Cause: Script called more than maxToolCalls tools Fix: Batch operations or use __safe_parallel
Cause: Script ran longer than timeoutMs Fix: Optimize, use less data, or increase timeout
Cause: Used a blocked identifier (eval, require, etc.) Fix: Use allowed alternatives

Development Mode

For easier debugging during development:

Testing Strategy

Unit Testing AgentScript

Use the Enclave library directly to test script execution in isolation:

Integration Testing

For end-to-end tests, set up a FrontMCP app with CodeCallPlugin and invoke the meta-tools through your MCP test client:

Testing Security Rules

CI/CD Integration



AgentScript Guide

Complete scripting API, error handling, and best practices

Configuration

Configure meta-tool behavior and limits

Security Model

How scripts are validated and sandboxed

Examples & Recipes

Real-world patterns using the meta-tools