Skip to main content
Glama

kunobi_refresh

Read-only

Force an immediate reconnect across all Kunobi variants. Use after launching or when status shows stale data to get fresh connection status.

Instructions

Force an immediate reconnect attempt across all configured Kunobi variants. Use this after launching Kunobi or when kunobi_status shows stale data. Returns the fresh connection status for all variants.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual handler for the 'kunobi_refresh' tool: calls manager.refresh() to force reconnection and returns formatted status for all variants.
      async () => {
        await manager.refresh();
        return {
          content: [
            { type: 'text' as const, text: formatRefreshResult(manager) },
          ],
        };
      },
    );
  • Schema definition for 'kunobi_refresh': no input parameters, read-only hint, with a description explaining its purpose.
    {
      description:
        'Force an immediate reconnect attempt across all configured Kunobi variants. Use this after launching Kunobi or when kunobi_status shows stale data. Returns the fresh connection status for all variants.',
      annotations: {
        readOnlyHint: true,
        destructiveHint: false,
        openWorldHint: false,
      },
    },
  • The registerRefreshTool function that registers 'kunobi_refresh' with the MCP server.
    export function registerRefreshTool(
      server: McpServer,
      manager: VariantManager,
    ): void {
  • Helper function that formats the refresh result into a human-readable string showing status per variant and installed variants.
    function formatRefreshResult(manager: VariantManager): string {
      const states = manager.getStates();
      const lines: string[] = ['Refresh complete. Current status:'];
    
      for (const [variant, state] of states) {
        const icon = state.status === 'connected' ? '✓' : '✗';
        const detail =
          state.status === 'connected'
            ? `connected, ${state.tools.length} tools`
            : state.status === 'connecting'
              ? 'connecting...'
              : state.status === 'disconnected'
                ? 'disconnected (reconnecting)'
                : 'not running';
        lines.push(
          `  ${icon} ${variant.padEnd(10)} (port ${state.port}) — ${detail}`,
        );
      }
    
      const installed = findKunobiVariants();
      if (installed.length > 0) {
        lines.push('', `Installed on system: ${installed.join(', ')}`);
      }
    
      return lines.join('\n');
    }
  • src/server.ts:154-156 (registration)
    Where registerRefreshTool is called to wire 'kunobi_refresh' into the MCP server.
    registerRefreshTool(server, manager);
    registerLaunchTool(server);
    registerCallTool(server, manager);
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. The description adds behavioral context by stating it forces a reconnect and returns fresh status. It does not contradict annotations.

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 two sentences (25 words) with no waste. The action is front-loaded, and each sentence adds value: first states the purpose, second gives usage context.

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?

For a simple tool with no parameters and no output schema, the description is complete. It explains when to use it, what it does, and what it returns. Annotations cover safety. No additional context is necessary.

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

Parameters4/5

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

There are zero parameters, and the schema coverage is 100%. According to the rubric, baseline is 4 for zero params. The description doesn't need to add parameter info, and it doesn't, which is appropriate.

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 the tool's function: 'Force an immediate reconnect attempt across all configured Kunobi variants.' It specifies the verb and resource, and distinguishes from siblings like kunobi_status and kunobi_launch by describing when to use it.

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

Usage Guidelines4/5

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

The description explicitly states when to use the tool: 'after launching Kunobi or when kunobi_status shows stale data.' This provides clear context, though it lacks explicit exclusions or alternative tool mentions.

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