Skip to main content
Glama

taxonomy_list_terms

Retrieve taxonomy terms from Paperlib MCP to organize academic literature by categories, enabling structured classification of research papers.

Instructions

列出词表规则

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNo
enabled_onlyNo

Implementation Reference

  • The handler function for the 'taxonomy_list_terms' tool. It queries the 'taxonomy_terms' table from the database, optionally filtering by 'kind' and 'enabled_only' parameters, and returns the list of terms.
    @mcp.tool()
    def taxonomy_list_terms(
        kind: str | None = None,
        enabled_only: bool = True,
    ) -> dict[str, Any]:
        """列出词表规则"""
        try:
            where = []
            params = []
            if kind:
                where.append("kind = %s")
                params.append(kind)
            if enabled_only:
                where.append("enabled = TRUE")
            where_sql = " WHERE " + " AND ".join(where) if where else ""
            
            rows = query_all(f"""
                SELECT term_id, kind, family, pattern, priority, enabled, notes
                FROM taxonomy_terms
                {where_sql}
                ORDER BY kind, priority ASC, family
            """, tuple(params))
            return {"terms": rows}
        except Exception as e:
            return {"error": str(e)}
  • Registration of the graph_v12 tools suite, which includes the 'taxonomy_list_terms' tool, by calling the register_graph_v12_tools function on the MCP instance.
    register_graph_v12_tools(mcp)
  • Import of the register_graph_v12_tools function used to register the tools including 'taxonomy_list_terms'.
    from paperlib_mcp.tools.graph_v12 import register_graph_v12_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/h-lu/paperlib-mcp'

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