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
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | ||
| enabled_only | No |
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)}
- src/paperlib_mcp/server.py:52-52 (registration)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)
- src/paperlib_mcp/server.py:31-31 (registration)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