list_docs
List all user-configured documents. Know what documents are available for search and reference.
Instructions
所持しているドキュメントの一覧を取得
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp_server_docs/server.py:27-29 (handler)The tool handler for 'list_docs' - an async function decorated with @mcp.tool() that returns a list of owned documents by delegating to doc_manager.list_documents()
async def list_docs() -> str: """所持しているドキュメントの一覧を取得""" return doc_manager.list_documents() - src/mcp_server_docs/server.py:26-26 (registration)Tool registration via the @mcp.tool() decorator on the list_docs async function, which registers it as an MCP tool named 'list_docs'
@mcp.tool() - The DocumentManager.list_documents() method that executes the actual logic - iterates over sorted doc keys, appends metadata descriptions if available, and returns newline-joined result
def list_documents(self) -> str: """ドキュメント一覧を返す""" result = [] for path in sorted(self.docs_content.keys()): description = self.docs_metadata.get(path, "") if description: result.append(f"{path} - {description}") else: result.append(path) return "\n".join(result) - src/mcp_server_docs/server.py:28-28 (schema)The docstring for list_docs serves as its schema/description - '所持しているドキュメントの一覧を取得' (Gets the list of owned documents). No parameters or complex schema needed as it takes no arguments and returns a string
"""所持しているドキュメントの一覧を取得"""