Skip to main content
Glama
TheOneTrueNiz

Grokipedia MCP Server

get_page_citations

Read-onlyIdempotent

Retrieve source citations for Grokipedia articles to verify claims, support academic research, and access original reference materials.

Instructions

Get the source citations for a Grokipedia article.

Use for: finding source materials, verifying claims, academic research, fact-checking. Returns: list of citations with title, URL, and description. Tips: Great for grounding AI-generated knowledge with original sources.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesUnique slug identifier of page to retrieve citations from
limitNoMaximum number of citations to return (optional, returns all if not specified)

Implementation Reference

  • The implementation of the 'get_page_citations' tool which fetches citations for a given page slug.
    async def get_page_citations(
        slug: Annotated[str, Field(description="Unique slug identifier of page to retrieve citations from")],
        limit: Annotated[int | None, Field(description="Maximum number of citations to return (optional, returns all if not specified)", ge=1)] = None,
        ctx: Context[ServerSession, AppContext] | None = None,
    ) -> CallToolResult:
        """Get the source citations for a Grokipedia article.
    
        Use for: finding source materials, verifying claims, academic research, fact-checking.
        Returns: list of citations with title, URL, and description.
        Tips: Great for grounding AI-generated knowledge with original sources.
        """
        if ctx is None:
            raise ValueError("Context is required")
    
        await ctx.debug(f"Fetching citations for: '{slug}' (limit={limit})")
    
        try:
            client = ctx.request_context.lifespan_context.client
            result = await client.get_page(slug=slug, include_content=False)
    
            if not result.found or result.page is None:
                await ctx.warning(f"Page not found: '{slug}'")
                raise ValueError(f"Page not found: {slug}")
    
            page = result.page
            all_citations = page.citations or []
            total_count = len(all_citations)
            
            citations = all_citations[:limit] if limit else all_citations
            is_limited = limit and total_count > limit
            
            await ctx.info(
                f"Retrieved {len(citations)} of {total_count} citations for: '{page.title}'"
            )
            
            if not all_citations:
                text_output = f"# {page.title}\n\nNo citations found."
                structured = {
                    "slug": page.slug,
                    "title": page.title,
                    "citations": [],
                    "total_count": 0,
                    "returned_count": 0,
                }
            else:
                header = f"# {page.title}\n\n"
                if is_limited:
                    header += f"Showing {len(citations)} of {total_count} citations:\n"
                else:
                    header += f"Found {total_count} citations:\n"
                
                text_parts = [header]
                for i, citation in enumerate(citations, 1):
                    text_parts.append(f"{i}. **{citation.title}**")
                    text_parts.append(f"   URL: {citation.url}")
                    if citation.description:
                        text_parts.append(f"   Description: {citation.description}")
                    text_parts.append("")
                
                if is_limited:
                    text_parts.append(f"... and {total_count - len(citations)} more citations")
                
                text_output = "\n".join(text_parts)
                structured = {
                    "slug": page.slug,
                    "title": page.title,
                    "citations": [c.model_dump() for c in citations],
                    "total_count": total_count,
                    "returned_count": len(citations),
                }
                
                if is_limited:
                    structured["_limited"] = True
            
            return CallToolResult(
                content=[TextContent(type="text", text=text_output)],
                structuredContent=structured,
            )
Behavior4/5

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

Since no output schema exists, the description valuably documents the return structure ('list of citations with title, URL, and description'). The 'Tips' section adds context about grounding AI knowledge. Does not contradict annotations (readOnlyHint=true aligns with 'Get').

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?

Excellent structure with clear section headers ('Use for:', 'Returns:', 'Tips:'). Information is front-loaded with the core purpose, and every sentence provides distinct value (use cases, return format, usage tips) without redundancy.

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 2-parameter read-only tool, the description is complete. It compensates for the missing output schema by detailing the return format, leverages annotations for safety profile, and provides sufficient context for an agent to invoke correctly.

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%, with slug and limit fully documented in the schema. The description does not add parameter-specific guidance, which is acceptable given the schema completeness—baseline score applies.

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?

Description opens with specific verb ('Get') and resource ('source citations for a Grokipedia article'), clearly distinguishing this from siblings like get_page or get_page_content which retrieve article content rather than bibliographic sources.

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?

Provides explicit 'Use for' section listing specific scenarios (verifying claims, academic research, fact-checking), offering strong positive guidance. Lacks explicit 'when not to use' or named sibling alternatives, though the specific use cases effectively imply the boundaries.

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/TheOneTrueNiz/mcp-grokipedia-tool'

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