Skip to main content
CodeCall configuration options CodeCall configuration options This page covers all configuration options for the CodeCall plugin, from quick presets to fine-grained control.

Plugin Initialization


Tool Visibility Modes

Control which tools appear in list_tools vs. CodeCall. Default mode. Hides all tools from list_tools, exposes via CodeCall.
Best for: Large toolsets (20+), OpenAPI adapters, clean client experience.

codecall_opt_in

Tools must explicitly opt into CodeCall. All tools visible in list_tools by default.
Best for: Gradual migration, mixed direct/CodeCall access.

metadata_driven

Full control via per-tool metadata. No global assumptions.
Best for: Small toolsets, fine-grained control.

Per-Tool Metadata

Control individual tool behavior with the codecall metadata field:

Metadata by Mode

Common Patterns

Use for: Most tools in codecall_only mode.
Use for: Core tools that should be directly accessible AND in CodeCall.
Use for: Admin tools, destructive operations, tools requiring human review.
Applied automatically to codecall:search, codecall:describe, etc.

Global Tool Filtering

Filter tools globally with includeTools:
The filter receives a ToolEntry with:

VM Configuration

Configure the JavaScript sandbox:

VM Presets

Preset Details

When to use: Healthcare, finance, PII processing, compliance-heavy environments.

Reference Sidecar Configuration (Pass-by-Reference)

The Reference Sidecar handles large data transfer between scripts and tools. Instead of passing full data through the VM, large values are stored externally with reference IDs.

Sidecar Presets by Security Level

How Pass-by-Reference Works

Benefits:
  • Scripts don’t need to handle large data in memory
  • VM stays lightweight and secure
  • Tool results can exceed VM memory limits
  • Reference IDs are opaque strings (no data leakage)

Embedding Configuration

Configure how tools are indexed for search:

Strategy Comparison

TF-IDF Configuration

TF-IDF extracts searchable text from:
  • Tool name (tokenized: users:listusers, list)
  • Description (weighted 3x)
  • Key terms from description (4+ characters, no stop words)

ML Configuration

ML strategy uses VectoriaDB internally. The model (~22MB) is downloaded on first use and cached locally.

Direct Invocation

Configure the codecall:invoke meta-tool for direct tool calls without VM overhead:

When to Use Direct Invoke

Performance Comparison

Error Response Format

Security Considerations

Direct invocation bypasses VM security validation. Only enable for tools you trust completely.
  • allowedTools: Always specify an explicit allowlist in production
  • No script execution: Direct calls cannot run arbitrary code
  • Same tool access rules: Tool Access Control (whitelist/blacklist) still applies
  • Audit logging: Direct calls are logged the same as scripted calls

Complete Configuration Example


Migration Guide

From Direct Tools to CodeCall

1

Add CodeCallPlugin

2

Mark Tools for CodeCall

3

Test Both Access Methods

Verify tools work via both direct calls and CodeCall.
4

Switch to codecall_only

5

Remove Direct Visibility


Security Model

Security implications of configuration choices

Production & Scaling

Performance tuning and monitoring

AgentScript Guide

Scripting language reference and best practices

API Reference

Complete meta-tool schemas and examples