Skip to main content
Glama

kunobi_call

Call a specific variant of a Kunobi tool by specifying variant, tool name, and arguments. Discover available tool schemas using kunobi://tools.

Instructions

Stable tool entrypoint for Kunobi operations. Call a variant tool via (variant, tool, arguments), e.g. variant="dev", tool="k8s". Use kunobi://tools to discover full downstream tool schemas and metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
variantYesKunobi variant name, e.g. "dev", "stable", "local".
toolYesRemote tool name without variant prefix, e.g. "k8s".
argumentsNoArguments object passed to the target variant tool. Match the selected tool inputSchema from kunobi://tools.

Implementation Reference

  • The main handler function for the 'kunobi_call' tool. Validates that the variant exists via manager.getStates(), then calls manager.callVariantTool(variant, tool, args) and returns the result. This is the core execution logic triggered when the tool is invoked.
      async ({ variant, tool, arguments: args }) => {
        const states = manager.getStates();
    
        if (!states.has(variant)) {
          return {
            content: [
              {
                type: 'text' as const,
                text: `Unknown variant "${variant}". Available variants: ${[...states.keys()].join(', ')}`,
              },
            ],
            isError: true,
          };
        }
    
        const result = await manager.callVariantTool(
          variant,
          tool,
          (args ?? {}) as Record<string, unknown>,
        );
    
        if (!result) {
          return {
            content: [
              {
                type: 'text' as const,
                text: `Variant "${variant}" is no longer available. Use kunobi_status/kunobi_refresh first.`,
              },
            ],
            isError: true,
          };
        }
    
        return result;
      },
    );
  • Input schema and registration for 'kunobi_call' using server.registerTool. Defines three input parameters: variant (string), tool (string), and arguments (optional record). Also specifies annotations like readOnlyHint, destructiveHint, and openWorldHint.
    'kunobi_call',
    {
      description:
        'Stable tool entrypoint for Kunobi operations. Call a variant tool via (variant, tool, arguments), e.g. variant="dev", tool="k8s". Use kunobi://tools to discover full downstream tool schemas and metadata.',
      inputSchema: {
        variant: z
          .string()
          .describe('Kunobi variant name, e.g. "dev", "stable", "local".'),
        tool: z
          .string()
          .describe('Remote tool name without variant prefix, e.g. "k8s".'),
        arguments: z
          .record(z.string(), z.unknown())
          .optional()
          .describe(
            'Arguments object passed to the target variant tool. Match the selected tool inputSchema from kunobi://tools.',
          ),
      },
      annotations: {
        readOnlyHint: false,
        destructiveHint: false,
        openWorldHint: true,
      },
    },
  • src/server.ts:156-156 (registration)
    Registration call: registerCallTool(server, manager) is invoked in the main server setup to register the 'kunobi_call' tool with the MCP server.
    registerCallTool(server, manager);
  • The VariantManager.callVariantTool method that the handler delegates to. Looks up the tracked variant by name, lazily connects if needed via addVariant, then calls tracked.bundler.callTool(tool, args) to actually execute the remote tool call.
    async callVariantTool(
      variant: string,
      tool: string,
      args: Record<string, unknown> = {},
    ): Promise<CallToolResult | null> {
      let tracked = this.tracked.get(variant);
      if (!tracked) {
        const port = this.ports[variant];
        if (port === undefined) return null;
        await this.addVariant(variant, port);
        tracked = this.tracked.get(variant);
      }
    
      if (!tracked) return null;
      return tracked.bundler.callTool(tool, args);
    }
  • src/catalog.ts:1-39 (registration)
    The buildDiscoveryCatalog function references 'kunobi_call' as the callTool identifier in the discovery catalog returned by the kunobi://tools resource, informing clients which tool to use for stable downstream calls.
    import type { VariantManager } from './manager.js';
    
    export function buildDiscoveryCatalog(manager: VariantManager): {
      callTool: 'kunobi_call';
      callShape: {
        variant: string;
        tool: string;
        arguments: Record<string, unknown>;
      };
      variants: Record<string, unknown>;
    } {
      const variants: Record<string, unknown> = {};
    
      for (const [variant, entry] of manager.getCatalog()) {
        variants[variant] = {
          port: entry.port,
          status: entry.status,
          tools: entry.tools.map((tool) => ({
            ...tool,
            dynamicToolName: `${variant}__${tool.name}`,
          })),
          resources: entry.resources,
          prompts: entry.prompts.map((prompt) => ({
            ...prompt,
            dynamicPromptName: `${variant}__${prompt.name}`,
          })),
        };
      }
    
      return {
        callTool: 'kunobi_call',
        callShape: {
          variant: 'dev',
          tool: 'k8s',
          arguments: { action: 'list', variant: 'events' },
        },
        variants,
      };
    }
Behavior4/5

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

The annotations already indicate non-readOnly and non-destructive behavior, and the description adds the dynamic nature of the tool by stating it calls variant tools and requires schema discovery. It does not detail side effects or permissions, but the combination justifies a 4.

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

Conciseness5/5

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

The description is extremely concise with two sentences that front-load the purpose and immediately provide actionable usage. Every sentence adds value without redundancy.

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

Completeness4/5

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

For a dynamic meta-tool with no output schema, the description adequately explains the invocation and discovery mechanism. Missing details about return values or error behavior are partially mitigated by the reference to schema discovery, but a bit more context on invocation guarantees would improve completeness.

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?

The input schema has 100% coverage with clear parameter descriptions. The description adds meaning by explaining the invocation pattern and explicitly instructing to match the arguments to the selected tool's inputSchema, which goes beyond the schema alone.

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 this is the 'Stable tool entrypoint for Kunobi operations' and explains the exact invocation pattern '(variant, tool, arguments)'. It distinguishes from sibling tools by being the generic call tool, while siblings like launch, refresh, and status likely have specific purposes.

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

Usage Guidelines3/5

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

The description gives an example usage and advises to use 'kunobi://tools' to discover downstream schemas. However, it does not explicitly state when to use this tool versus alternatives like kunobi_launch, nor does it provide conditions when not to use it.

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/kunobi-ninja/mcp'

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