Skip to main content
Glama
IQAIcom
by IQAIcom

SEARCH_WIKI

Query IQ.wiki to find specific wikis, enabling AI assistants and applications to retrieve user-created, user-edited content, and detailed wiki activities.

Instructions

Search for a wiki from IQ.wiki by query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe query to search for

Implementation Reference

  • The execute function of the SEARCH_WIKI tool, which instantiates SearchWikiService, calls it with the query, formats the result, and handles errors.
    execute: async (params: SearchWikiParams) => {
    	try {
    		const service = new SearchWikiService();
    		const search = await service.execute(params.query);
    
    		return service.format(search);
    	} catch (error) {
    		if (error instanceof Error) {
    			console.log(`Error in SEARCH_WIKI tool: ${error.message}`);
    			return `Error searching for wiki: ${error.message}`;
    		}
    		return "An unknown error occurred while searching for wiki data";
    	}
    },
  • Zod schema defining the input parameters for the SEARCH_WIKI tool.
    const searchWikiParams = z.object({
    	query: z.string().min(1).describe("The query to search for"),
    });
  • src/index.ts:21-21 (registration)
    Registers the searchWikiTool in the MCP server.
    server.addTool(searchWikiTool);
  • SearchWikiService class containing execute method that performs GraphQL search using SEARCH_WIKIS_QUERY and format method to present results.
    export class SearchWikiService {
    	async execute(query: string) {
    		const response = await client.request(SEARCH_WIKIS_QUERY, { query });
    		return response.search;
    	}
    
    	format(search: Awaited<ReturnType<typeof this.execute>>) {
    		const formattedSearch = dedent`
    			šŸ“œ Search Results
    			- Answer: ${search.answer}
    			- Wiki Suggestions: ${(search.suggestions ?? [])
    				.map(
    					(suggestion: {
    						id: string;
    						title: string;
    					}) => `${suggestion.title} (${suggestion.id})`,
    				)
    				.join(", ")}
    		`;
    
    		return formattedSearch;
    	}
    }
  • GraphQL query definition used by SearchWikiService for searching wikis.
    export const SEARCH_WIKIS_QUERY = graphql(`
      query searchWikis($query: String!) {
        search(query: $query) {
          answer
          suggestions {
            id
            title
          }
        }
      }
    `);
Behavior2/5

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

With no annotations provided, the description carries the full burden but only states the basic action without disclosing behavioral traits such as search scope, result format, pagination, rate limits, or authentication needs. This is inadequate for a search tool with no structured safety or operational hints.

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 a single, efficient sentence with no wasted words, clearly front-loading the purpose. It's appropriately sized for a simple search tool, making it easy to parse quickly.

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 no annotations, no output schema, and a simple parameter, the description is incomplete. It lacks details on behavior, result handling, and differentiation from siblings, which are crucial for effective tool selection and invocation in this context.

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?

Schema description coverage is 100%, so the parameter 'query' is well-documented in the schema. The description adds no additional meaning beyond implying it's for searching, which the schema already covers. This meets the baseline for high schema coverage without extra value.

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 for a wiki') and target resource ('from IQ.wiki by query'), making the purpose understandable. However, it doesn't differentiate from sibling tools like GET_WIKI, which might retrieve a specific wiki rather than search multiple ones, so it misses full sibling distinction.

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?

No guidance is provided on when to use this tool versus alternatives like GET_WIKI or other user-focused tools. The description implies usage for searching by query but doesn't specify context, exclusions, or comparisons to siblings, leaving the agent with minimal direction.

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

Related 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/IQAIcom/mcp-iqwiki'

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