Skip to main content
Glama
portel-dev

NCP - Natural Context Provider

by portel-dev

code

Execute TypeScript code with automatic tool discovery and parameter mapping using ncp.do().

Instructions

Execute TypeScript code with automatic tool discovery and parameter mapping.

PRIMARY METHOD - ncp.do(intent, params): Single-call execution with embedding-based param matching. No need to know exact tool names or param schemas!

ncp.do("send email", { recipient: "john@example.com", // Auto-maps to "to" title: "Meeting", // Auto-maps to "subject" message: "Let's meet" // Auto-maps to "body" })

Returns on success: { success: true, tool, result, paramMappings } Returns on failure: { success: false, tool, schema, hint }

  • schema shows actual params needed

  • hint suggests corrections

  • Retry with correct params!

FALLBACK - Direct namespace calls (when you know exact tools):

  • ncp.find("query"): Returns Tool[] with { toolName, schema, confidence }

  • namespace.tool(): Direct call e.g., gmail.send_email({ to, subject, body })

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesTypeScript code. Use ncp.do("intent", { params }) for automatic tool discovery and param mapping.
timeoutNoTimeout in ms (default: 30000, max: 300000)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultNoReturn value from code execution (any type)
logsNoCaptured console output
errorsNoAny errors that occurred
executionTimeNoExecution time in milliseconds
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavior. It explains code execution, automatic param mapping, and timeouts. However, it omits warning about potential destructive actions from arbitrary code execution, which is a slight gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with headings, bullet points, and examples. While it is relatively long, the complexity of the tool justifies the detail. Some redundancy could be trimmed, but it effectively communicates necessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity, the description covers execution method, parameter usage, return values (success/failure), timeout, and mentions the sibling tool. With an output schema present, it doesn't need to detail return format, but it still provides useful return structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 2 parameters at 100% description coverage. The description adds significant value by explaining how to use the 'code' parameter with ncp.do examples, such as using 'intent' and 'params' objects, and clarifies the timeout defaults and limits.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it executes TypeScript code for automatic tool discovery and parameter mapping. It distinguishes itself from the sibling tool 'find' by explaining the primary method (ncp.do) and fallback direct calls, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells when to use ncp.do (primary, embedding-based param matching) versus direct namespace calls (when exact tools known). It provides success/failure behavior and retry guidance, offering comprehensive usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/portel-dev/ncp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server