What is a tool?
A tool is the fundamental unit of work in MCPCore. It has:- A name — how the AI client identifies and calls it (e.g.
fetch_repo_stats) - A description — plain-language explanation of what the tool does; the AI uses this to decide when to call it
- Parameters — the typed inputs the AI passes at call time
- Code — the JavaScript that runs when the tool is invoked
Create a tool
Name your tool
Choose a clear, descriptive name in lowercase snake_case:
The name appears in the MCP schema and in your analytics dashboard. It cannot contain spaces or special characters.
| Good | Avoid |
|---|---|
fetch_user_orders | FetchUserOrders |
send_slack_message | sendSlackMessage |
query_inventory_db | tool1 |
Write a description
The description is critically important — it’s what the AI reads to decide when to call your tool. Be specific.Good description:
Fetches the number of stars, forks, and primary language for a GitHub repository. Use when the user asks about repository statistics or open-source project metrics.Weak description:
Gets GitHub data.
Add parameters
Define the inputs your code will receive via
params.*. See Parameters for the full schema reference.Write the code
Write JavaScript in the editor. The sandbox gives you access to 
sdk, params, env, and console. See Sandbox for the complete API.
A minimal tool
sdk.http() makes an HTTP request. env.GITHUB_TOKEN is a secret stored in the dashboard. params.repo is the value the AI passed at call time. The object you return is what the AI receives as the tool result.
Tool limits
| Limit | Value |
|---|---|
| Code size | 512 KB |
| Execution timeout | 30 seconds |
| Response payload | 4 MB |
| Parameters per tool | 50 |
