Skip to main content
Glama
r3-yamauchi

Amazon Bedrock Knowledge Base MCP Server

by r3-yamauchi

list_data_sources

Retrieve all data sources linked to a specific Amazon Bedrock Knowledge Base to manage document ingestion and RAG query configurations.

Instructions

指定されたKnowledge Baseのデータソース一覧を取得します。

Knowledge Baseに紐づけられているすべてのデータソースを取得します。

Args: knowledge_base_id: Knowledge BaseのID

Returns: DataSourceListResponseDict: データソース一覧 - count: データソースの数 - data_sources: データソースの詳細情報のリスト 各要素には以下の情報が含まれます: - id: データソースのID - name: データソースの名前 - status: データソースのステータス - dataSourceConfiguration: データソースの設定情報

Raises: ValueError: knowledge_base_idが空の場合

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
knowledge_base_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes
data_sourcesYes

Implementation Reference

  • The implementation of the `list_data_sources` MCP tool, which validates the knowledge_base_id and delegates the data retrieval to the `bedrock_client.list_data_sources` method.
    @mcp.tool()  # MCPツールとして公開
    @handle_errors  # エラーハンドリングデコレータを適用
    def list_data_sources(knowledge_base_id: str) -> DataSourceListResponseDict:
        """
        指定されたKnowledge Baseのデータソース一覧を取得します。
        
        Knowledge Baseに紐づけられているすべてのデータソースを取得します。
    
        Args:
            knowledge_base_id: Knowledge BaseのID
    
        Returns:
            DataSourceListResponseDict: データソース一覧
                - count: データソースの数
                - data_sources: データソースの詳細情報のリスト
                    各要素には以下の情報が含まれます:
                    - id: データソースのID
                    - name: データソースの名前
                    - status: データソースのステータス
                    - dataSourceConfiguration: データソースの設定情報
        
        Raises:
            ValueError: knowledge_base_idが空の場合
        """
        # 入力値のバリデーション(共通関数を使用)
        knowledge_base_id = validate_required_string(knowledge_base_id, "knowledge_base_id")
        
        # Bedrockクライアントからデータソース一覧を取得
        data_sources = bedrock_client.list_data_sources(knowledge_base_id)
        return {
            "count": len(data_sources),
            "data_sources": data_sources,
        }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It states the tool retrieves data (read-only implied) and mentions an error case (ValueError for empty ID), but lacks critical behavioral details: whether it requires authentication, rate limits, pagination handling (the 'count' field suggests multiple items), or what happens if the knowledge base doesn't exist. For a read operation with zero annotation coverage, this is insufficient.

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 appropriately sized but not optimally structured. It front-loads the purpose, but includes a redundant second sentence. The Args/Returns/Raises sections are clear but could be more integrated. Some details (like error handling) are useful, but the overall flow could be tighter.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (single parameter, read operation) and the presence of an output schema (implied by the detailed return description), the description is mostly complete. It covers purpose, parameters, returns, and an error case. However, it lacks behavioral context (e.g., auth, pagination) which would be needed for full completeness, especially with no annotations.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate fully. It does: it explicitly documents the single parameter 'knowledge_base_id' with its purpose ('Knowledge BaseのID'), and provides detailed return value semantics including nested structure ('count', 'data_sources' with 'id', 'name', 'status', 'dataSourceConfiguration'). This adds substantial meaning beyond the bare schema.

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 action ('取得します' - retrieve/get) and resource ('データソース一覧' - data source list) for a specific Knowledge Base. It distinguishes from siblings like 'list_knowledge_bases' (which lists knowledge bases themselves) and 'list_s3_documents' (which lists documents in S3). However, it doesn't explicitly contrast with 'get_knowledge_base' which retrieves details of a single knowledge base.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing knowledge base), nor does it compare with sibling tools like 'get_knowledge_base' for single knowledge base details or 'list_knowledge_bases' for listing knowledge bases themselves. The context is implied but not explicit.

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

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/r3-yamauchi/bedrock-kb-mcp-server'

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