list_docs
Retrieve a list of documents stored in the Docs-MCP server to efficiently manage and access user-configured files for search and reference purposes.
Instructions
所持しているドキュメントの一覧を取得
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"title": "list_docsArguments",
"type": "object"
}
Implementation Reference
- src/mcp_server_docs/server.py:26-29 (handler)MCP tool handler for 'list_docs': decorated with @mcp.tool(), provides docstring, and delegates to DocumentManager.list_documents() to list available documents.@mcp.tool() async def list_docs() -> str: """所持しているドキュメントの一覧を取得""" return doc_manager.list_documents()
- Core logic for listing documents: iterates over loaded docs_content, appends path and metadata description, joins into a string.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)