Skip to main content
Glama
IQAIcom
by IQAIcom

GET_USER_CREATED_WIKIS

Retrieve wikis created by a specific user on IQ.wiki using their Ethereum address, with an optional time frame filter.

Instructions

Get wikis created by a specific user on IQ.wiki

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe Ethereum address of the user
timeFrameSecondsNoOptional time frame in seconds to filter results

Implementation Reference

  • The execute function that implements the tool's main logic by instantiating and calling the GetUserCreatedWikisService.
    execute: async (params: GetUserCreatedWikisParams) => {
    	try {
    		const service = new GetUserCreatedWikisService();
    		const wikis = await service.execute(params.id, params.timeFrameSeconds);
    
    		return service.format(wikis);
    	} catch (error) {
    		if (error instanceof Error) {
    			console.log(`Error in GET_USER_CREATED_WIKIS tool: ${error.message}`);
    			return `Error retrieving user created wikis: ${error.message}`;
    		}
    		return "An unknown error occurred while fetching user created wikis";
    	}
    },
  • Zod schema defining the input parameters: user ID (Ethereum address) and optional time frame.
    const getUserCreatedWikisParams = z.object({
    	id: z.string().min(1).describe("The Ethereum address of the user"),
    	timeFrameSeconds: z
    		.number()
    		.optional()
    		.describe("Optional time frame in seconds to filter results"),
    });
  • src/index.ts:18-18 (registration)
    The tool is registered with the FastMCP server instance.
    server.addTool(getUserCreatedWikisTool);
  • The GetUserCreatedWikisService class containing the execute method for GraphQL query and data processing, and format method for output formatting.
    export class GetUserCreatedWikisService {
    	async execute(id: string, timeFrameSeconds?: number) {
    		try {
    			const response: any = await client.request(USER_CREATED_WIKIS_QUERY, {
    				id,
    			});
    
    			if (!response.userById) {
    				throw new Error("user does not exist");
    			}
    			if (!response.userById.wikisCreated.activity) {
    				throw new Error("user has not created any wikis");
    			}
    
    			let wikis = response.userById.wikisCreated.activity[0].content;
    
    			// Filter by time if timeFrameSeconds is provided
    			if (timeFrameSeconds) {
    				const now = new Date();
    				const timeLimit = new Date(now.getTime() - timeFrameSeconds * 1000);
    
    				// Filter wikis by creation time
    				wikis = wikis.filter((wiki: any) => {
    					if (!wiki.created) return false;
    					const wikiDate = new Date(wiki.created);
    					return wikiDate >= timeLimit;
    				});
    
    				if (wikis.length === 0) {
    					// Convert seconds to a human-readable format for the error message
    					const timeFrameText =
    						timeFrameSeconds >= 86400
    							? `${timeFrameSeconds / 86400} day(s)`
    							: timeFrameSeconds >= 3600
    								? `${timeFrameSeconds / 3600} hour(s)`
    								: `${timeFrameSeconds / 60} minute(s)`;
    
    					throw new Error(
    						`No created wikis found in the last ${timeFrameText}`,
    					);
    				}
    			}
    
    			return wikis;
    		} catch (error: any) {
    			throw new Error(error.message);
    		}
    	}
    
    	format(wikis: any) {
    		return wikis
    			.map((wiki: any) => {
    				const date = new Date(wiki.created);
    				const formattedDate = date.toLocaleString();
    
    				return dedent`
    						šŸ“œ Wiki Created
    						- Title: ${wiki.title}
    						- Summary: ${wiki.summary}
    						- Created: ${formattedDate}
    
    						šŸ”— Source: ${IQ_BASE_URL}/${wiki.id}
    						šŸ”— Transaction: https://polygonscan.com/tx/${wiki.transactionHash}
    					`;
    			})
    			.join("\n\n");
    	}
    }
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 of behavioral disclosure. It states the tool retrieves wikis but doesn't mention critical traits like whether it's read-only, pagination behavior, rate limits, error handling, or authentication requirements. This leaves significant gaps for a tool that likely queries user data.

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 that front-loads the core purpose without unnecessary details. It avoids redundancy and wastes no words, 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 the lack of annotations and output schema, the description is incomplete for a tool that likely returns a list of wikis. It doesn't explain the return format (e.g., list structure, fields included), error conditions, or behavioral constraints, which are essential for effective use by an AI agent.

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 100% description coverage, clearly documenting both parameters (id as Ethereum address, timeFrameSeconds as optional filter). The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline for high schema coverage without compensating 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 ('Get wikis') and target resource ('created by a specific user on IQ.wiki'), which distinguishes it from siblings like GET_USER_EDITED_WIKIS (edited wikis) and GET_WIKI (general wiki retrieval). However, it doesn't explicitly contrast with GET_USER_WIKI_ACTIVITIES, which might overlap in scope.

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 explicit guidance on when to use this tool versus alternatives like GET_USER_EDITED_WIKIS or GET_USER_WIKI_ACTIVITIES is provided. The description implies usage for retrieving user-created wikis but lacks context on exclusions or prerequisites, such as whether it requires authentication or specific permissions.

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