Skip to main content
Glama

kobold_web_search

Search the web using DuckDuckGo to find information for KoboldAI text generation tasks.

Instructions

Search the web via DuckDuckGo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiUrlNohttp://localhost:5001
queryYes

Implementation Reference

  • Handler for kobold_web_search: maps tool call to KoboldAI endpoint '/api/extra/websearch' via generic POST proxy using makeRequest, validates input with WebSearchSchema, returns JSON response.
    const postEndpoints: Record<string, { endpoint: string; schema: z.ZodTypeAny }> = {
        kobold_multiplayer_status: { endpoint: '/api/extra/multiplayer/status', schema: MultiplayerStatusSchema },
        kobold_multiplayer_get_story: { endpoint: '/api/extra/multiplayer/getstory', schema: MultiplayerGetStorySchema },
        kobold_multiplayer_set_story: { endpoint: '/api/extra/multiplayer/setstory', schema: MultiplayerSetStorySchema },
        kobold_generate_check_multiuser: { endpoint: '/api/extra/generate/check', schema: GenerateCheckMultiuserSchema },
        kobold_generate: { endpoint: '/api/v1/generate', schema: GenerateSchema },
        kobold_token_count: { endpoint: '/api/extra/tokencount', schema: TokenCountSchema },
        kobold_detokenize: { endpoint: '/api/extra/detokenize', schema: DetokenizeSchema },
        kobold_transcribe: { endpoint: '/api/extra/transcribe', schema: TranscribeSchema },
        kobold_web_search: { endpoint: '/api/extra/websearch', schema: WebSearchSchema },
        kobold_tts: { endpoint: '/api/extra/tts', schema: TTSSchema },
        kobold_abort: { endpoint: '/api/extra/abort', schema: AbortSchema },
        kobold_last_logprobs: { endpoint: '/api/extra/last_logprobs', schema: LastLogProbsSchema },
        kobold_txt2img: { endpoint: '/sdapi/v1/txt2img', schema: Txt2ImgSchema },
        kobold_img2img: { endpoint: '/sdapi/v1/img2img', schema: Img2ImgSchema },
        kobold_interrogate: { endpoint: '/sdapi/v1/interrogate', schema: InterrogateSchema },
        kobold_complete: { endpoint: '/v1/completions', schema: CompletionSchema },
    };
    
    if (postEndpoints[name]) {
        const { endpoint, schema } = postEndpoints[name];
        const parsed = schema.safeParse(args);
        if (!parsed.success) {
            throw new Error(`Invalid arguments: ${parsed.error}`);
        }
    
        const result = await makeRequest(`${apiUrl}${endpoint}`, 'POST', requestData);
        return {
            content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
            isError: false,
        };
  • Zod schema for kobold_web_search input: extends BaseConfigSchema (apiUrl) with required 'query' string.
    const WebSearchSchema = BaseConfigSchema.extend({
        query: z.string(),
    });
  • src/index.ts:213-217 (registration)
    Tool registration in ListTools response: defines name, description, and inputSchema for kobold_web_search.
    {
        name: "kobold_web_search",
        description: "Search the web via DuckDuckGo",
        inputSchema: zodToJsonSchema(WebSearchSchema),
    },
  • Utility function used by all proxy handlers, including kobold_web_search, to make HTTP requests to KoboldAI API.
    async function makeRequest(url: string, method = 'GET', body: Record<string, unknown> | null = null) {
        const options: RequestInit = {
            method,
            headers: body ? { 'Content-Type': 'application/json' } : undefined,
        };
        
        if (body && method !== 'GET') {
            options.body = JSON.stringify(body);
        }
    
        const response = await fetch(url, options);
        if (!response.ok) {
            throw new Error(`KoboldAI API error: ${response.statusText}`);
        }
        
        return response.json();
    }
Behavior1/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but offers minimal information. It doesn't describe what the search returns (e.g., results format, limitations), rate limits, authentication needs, or error conditions. 'Search the web via DuckDuckGo' gives only basic function without behavioral context.

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 at just 5 words, with zero wasted language. It's front-loaded with the core function, though this brevity comes at the cost of completeness.

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

Completeness1/5

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

Given 2 parameters with 0% schema coverage, no annotations, no output schema, and a web search function that typically returns complex results, the description is severely incomplete. It doesn't explain what the tool actually returns, how to interpret results, or any operational constraints.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate but fails to do so. It mentions no parameters at all, leaving both 'apiUrl' and 'query' undocumented in meaning or usage. The description adds no value beyond what the bare schema provides.

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

Purpose4/5

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

The description clearly states the action ('Search') and target ('the web via DuckDuckGo'), providing a specific verb+resource combination. However, it doesn't distinguish this web search tool from its siblings (which are mostly AI model interaction tools), missing full differentiation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. There's no mention of when web search is appropriate compared to the sibling tools (like kobold_chat or kobold_generate), nor any prerequisites or exclusions for usage.

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/PhialsBasement/KoboldCPP-MCP-Server'

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