Skip to main content
Glama
huiseo
by huiseo

ask_wiki

Get answers to questions by retrieving relevant information from wiki content using RAG technology.

Instructions

Ask a question and get an answer based on wiki content using RAG.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
questionYes

Implementation Reference

  • The main handler function for the 'ask_wiki' tool. It checks if brain features are enabled, queries the brain for an answer using RAG on wiki documents, and returns the answer along with source titles and URLs.
    async ask_wiki(args: { question: string }) {
      if (!brain.isEnabled()) {
        return { error: ERROR_MESSAGES.SMART_FEATURES_DISABLED };
      }
    
      const { answer, sources } = await brain.ask(args.question);
    
      return {
        answer,
        sources: sources.map((s) => ({
          title: s.title,
          url: s.url,
        })),
      };
    },
  • Zod input schema for the 'ask_wiki' tool, defining a required 'question' string parameter.
    export const askWikiSchema = z.object({
      question: z.string().min(1, 'Question is required'),
    });
  • Registers the 'ask_wiki' tool in the MCP tool definitions array, providing name, description, and linking to the Zod schema.
    createTool(
      'ask_wiki',
      'Ask a question and get an answer based on wiki content using RAG.',
      'ask_wiki'
    ),
  • Spreads the smart handlers (including 'ask_wiki') from createSmartHandlers into the main ToolHandlers object used for tool execution.
    ...createSmartHandlers(ctx),
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'using RAG' which hints at retrieval-augmented generation, but doesn't explain what this entails—such as whether it's read-only, how it handles ambiguous questions, potential rate limits, or authentication needs. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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 and front-loaded: 'Ask a question and get an answer based on wiki content using RAG.' It wastes no words and directly communicates the core functionality in a single, clear sentence. Every part of the description earns its place by specifying the action, resource, and method.

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

Completeness2/5

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

Given the complexity of a RAG-based tool with no annotations, no output schema, and low schema coverage, the description is incomplete. It doesn't explain what the output looks like (e.g., answer format, confidence scores), how errors are handled, or prerequisites for use. For a tool that likely involves AI processing, more context is needed to ensure proper agent invocation.

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

Parameters3/5

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

The input schema has 1 parameter with 0% description coverage, and the description doesn't add any details about the 'question' parameter beyond implying it's a string. Since schema coverage is low, the description should compensate but doesn't—it doesn't explain question format, length limits, or examples. However, with only one simple parameter, the baseline is moderate, but more guidance would improve usability.

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 tool's purpose: 'Ask a question and get an answer based on wiki content using RAG.' It specifies the verb ('ask'), resource ('wiki content'), and method ('using RAG'), making it easy to understand what the tool does. However, it doesn't explicitly distinguish itself from sibling tools like 'search_documents' or 'find_related', which might also retrieve wiki information.

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. With sibling tools like 'search_documents', 'find_related', and 'get_document', there's no indication of when this RAG-based question-answering approach is preferred over direct search or retrieval methods. The description lacks context about use cases or exclusions.

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/huiseo/outline-wiki-mcp'

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