Skip to main content
Glama

search

Retrieve precise competitive programming knowledge from OI-Wiki by submitting detailed queries about algorithms or techniques, such as finding a graph's minimum spanning tree or managing interval operations.

Instructions

OI Wiki 致力于成为一个免费开放且持续更新的编程竞赛知识整合站点,大家可以在这里获取与竞赛相关的、有趣又实用的知识。本工具能够在 OI-wiki 中搜索相关的知识点。

query 应该比较详细,与要实现的算法/目标相关。比如:“求一个图的最小生成树”,“维护区间加/区间求和”

@ param query 描述要实现的需求

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Implementation Reference

  • main.py:8-17 (handler)
    The handler function for the MCP 'search' tool, decorated with @mcp.tool(). It takes a query string and delegates to the database search method.
    @mcp.tool()
    async def search(query: str):
        """
        OI Wiki 致力于成为一个免费开放且持续更新的编程竞赛知识整合站点,大家可以在这里获取与竞赛相关的、有趣又实用的知识。本工具能够在 OI-wiki 中搜索相关的知识点。
        
        query 应该比较详细,与要实现的算法/目标相关。比如:“求一个图的最小生成树”,“维护区间加/区间求和”
        
        @ param query 描述要实现的需求
        """
        return db.search(query)
  • main.py:8-8 (registration)
    The @mcp.tool() decorator registers the 'search' function as an MCP tool.
    @mcp.tool()
  • main.py:9-9 (schema)
    Function signature defining the input schema: query as str.
    async def search(query: str):
  • The helper search method in OIWikiDB class that performs vector search using Milvus and retrieves the content of the most relevant OI-Wiki document.
    def search(self, query : str) :
        qvectors = list(self._embedding_model.embed([query]))
        results = self._client.search(
            collection_name=self._collection_name, 
            data=qvectors, 
            limit=1,
            output_fields=["path"]
        )
    
        path = os.path.join(self._docs_dir, results[0][0].entity.path)
        with open(path, 'r') as f:
            res = f.read()
    
        return res
  • main.py:6-6 (helper)
    Instantiation of the database instance used by the search tool.
    db = OIWikiDB()
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 that the tool searches OI-wiki for knowledge points, but does not disclose critical behavioral traits such as whether it returns a list of results, how results are formatted, if there are rate limits, authentication needs, or error handling. The description is minimal and lacks operational details beyond the basic function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is moderately concise but includes an unnecessary first sentence about OI Wiki's mission, which does not directly help in tool selection or invocation. The core tool function and parameter guidance are presented in subsequent sentences, but the structure could be improved by front-loading the tool's purpose more clearly. Overall, it's adequate but not optimally structured.

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 tool's complexity (a search function with no output schema and no annotations), the description is incomplete. It covers the basic purpose and parameter semantics but lacks details on behavioral aspects like result format, error cases, or usage limits. Without annotations or output schema, the description should provide more context to ensure the agent can use the tool effectively, but it falls short in this regard.

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

Parameters4/5

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

The description adds significant meaning beyond the input schema, which has 0% coverage. It explains the 'query' parameter: '描述要实现的需求' (describes the requirement to implement) and provides examples like '求一个图的最小生成树' (find the minimum spanning tree of a graph). This clarifies the parameter's purpose and expected content, compensating well for the lack of schema descriptions, though it could be more detailed on constraints or formats.

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: '本工具能够在 OI-wiki 中搜索相关的知识点' (This tool can search for relevant knowledge points in OI-wiki). It specifies the verb '搜索' (search) and the resource 'OI-wiki 中的知识点' (knowledge points in OI-wiki). However, it lacks explicit differentiation from siblings (though none exist), and the first sentence about OI Wiki's mission is somewhat tangential to the tool's function.

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

Usage Guidelines3/5

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

The description provides implied usage guidance through examples: 'query 应该比较详细,与要实现的算法/目标相关。比如:“求一个图的最小生成树”,“维护区间加/区间求和”' (The query should be detailed and related to the algorithm/goal to implement. For example: 'Find the minimum spanning tree of a graph', 'Maintain interval addition/interval summation'). This suggests when to use the tool (for detailed algorithm-related queries) but does not explicitly state when not to use it or mention alternatives, and there are no siblings to compare against.

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/ShwStone/mcp-oi-wiki'

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