Skip to main content
Glama
r3-yamauchi

Amazon Bedrock Knowledge Base MCP Server

by r3-yamauchi

get_ingestion_job

Retrieve the status and detailed information for a data ingestion job in Amazon Bedrock Knowledge Base, including progress, statistics, and error details.

Instructions

取り込みジョブのステータスと詳細情報を取得します。

取り込みジョブの進捗状況、統計情報、エラー情報などを取得できます。

Args: knowledge_base_id: Knowledge BaseのID data_source_id: データソースのID ingestion_job_id: 取り込みジョブのID(start_ingestion_jobで取得)

Returns: IngestionJobResponseDict: 取り込みジョブの詳細情報 - ingestion_job_id: 取り込みジョブのID - status: ジョブのステータス - "STARTING": ジョブが開始中 - "IN_PROGRESS": ジョブが実行中 - "COMPLETE": ジョブが完了 - "FAILED": ジョブが失敗 - statistics: 統計情報(オプション、ジョブが進行中または完了している場合) - numberOfDocumentsScanned: スキャンされたドキュメント数 - numberOfDocumentsModified: 変更されたドキュメント数 - numberOfDocumentsDeleted: 削除されたドキュメント数 - numberOfDocumentsFailed: 失敗したドキュメント数

Raises: ValueError: いずれかのIDが空の場合

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
knowledge_base_idYes
data_source_idYes
ingestion_job_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYes
statisticsYes
ingestion_job_idYes

Implementation Reference

  • The 'get_ingestion_job' tool is registered with @mcp.tool() and handles the ingestion job retrieval, calling the bedrock_client.
    @mcp.tool()  # MCPツールとして公開
    @handle_errors  # エラーハンドリングデコレータを適用
    def get_ingestion_job(
        knowledge_base_id: str, data_source_id: str, ingestion_job_id: str
    ) -> IngestionJobResponseDict:
        """
        取り込みジョブのステータスと詳細情報を取得します。
        
        取り込みジョブの進捗状況、統計情報、エラー情報などを取得できます。
    
        Args:
            knowledge_base_id: Knowledge BaseのID
            data_source_id: データソースのID
            ingestion_job_id: 取り込みジョブのID(`start_ingestion_job`で取得)
    
        Returns:
            IngestionJobResponseDict: 取り込みジョブの詳細情報
                - ingestion_job_id: 取り込みジョブのID
                - status: ジョブのステータス
                    - "STARTING": ジョブが開始中
                    - "IN_PROGRESS": ジョブが実行中
                    - "COMPLETE": ジョブが完了
                    - "FAILED": ジョブが失敗
                - statistics: 統計情報(オプション、ジョブが進行中または完了している場合)
                    - numberOfDocumentsScanned: スキャンされたドキュメント数
                    - numberOfDocumentsModified: 変更されたドキュメント数
                    - numberOfDocumentsDeleted: 削除されたドキュメント数
                    - numberOfDocumentsFailed: 失敗したドキュメント数
        
        Raises:
            ValueError: いずれかのIDが空の場合
        """
        # 入力値のバリデーション(共通関数を使用)
        knowledge_base_id = validate_required_string(knowledge_base_id, "knowledge_base_id")
        data_source_id = validate_required_string(data_source_id, "data_source_id")
        ingestion_job_id = validate_required_string(ingestion_job_id, "ingestion_job_id")
        
        # Bedrockクライアントから取り込みジョブの詳細を取得
        result = bedrock_client.get_ingestion_job(
            knowledge_base_id, data_source_id, ingestion_job_id
        )
        return result
  • The underlying implementation of 'get_ingestion_job' that makes the AWS Bedrock API call via bedrock_agent.
    def get_ingestion_job(
        self, knowledge_base_id: str, data_source_id: str, ingestion_job_id: str
    ) -> IngestionJobResponseDict:
        """
        取り込みジョブのステータスと詳細情報を取得します。
        
        取り込みジョブの進捗状況、統計情報、エラー情報などを取得できます。
        ジョブの完了を待つために、この関数を定期的に呼び出すことができます。
    
        Args:
            knowledge_base_id: Knowledge BaseのID
            data_source_id: データソースのID
            ingestion_job_id: 取り込みジョブのID(`start_ingestion_job`で取得)
    
        Returns:
            IngestionJobResponseDict: 取り込みジョブの詳細情報
                - ingestion_job_id: 取り込みジョブのID
                - status: ジョブのステータス
                    - "STARTING": ジョブが開始中
                    - "IN_PROGRESS": ジョブが実行中
                    - "COMPLETE": ジョブが完了
                    - "FAILED": ジョブが失敗
                - statistics: 統計情報(オプション、ジョブが進行中または完了している場合)
                    - numberOfDocumentsScanned: スキャンされたドキュメント数
                    - numberOfDocumentsModified: 変更されたドキュメント数
                    - numberOfDocumentsDeleted: 削除されたドキュメント数
                    - numberOfDocumentsFailed: 失敗したドキュメント数
        
        Raises:
            ClientError: AWS API呼び出しが失敗した場合
        """
        try:
            # AWS Bedrock APIを呼び出して取り込みジョブの詳細を取得
            response = self.bedrock_agent.get_ingestion_job(
                knowledgeBaseId=knowledge_base_id,
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool retrieves status, progress, statistics, and error information, and mentions a ValueError for empty IDs, which adds some behavioral context. However, it lacks details on permissions, rate limits, or side effects, leaving gaps for a mutation-free but potentially sensitive operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (Args, Returns, Raises) and uses bullet points for returns, making it easy to scan. It is appropriately sized, though the Japanese text might be slightly verbose; every sentence adds value without redundancy.

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 complexity (3 required parameters, no annotations, but has an output schema), the description is fairly complete. It explains the purpose, parameters, return values (including status enums and statistics), and error conditions. The output schema reduces the need to detail returns, but more behavioral context (e.g., idempotency, auth) would enhance completeness.

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

Parameters4/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. It adds meaning by explaining each parameter's purpose (e.g., knowledge_base_id as Knowledge Base ID, ingestion_job_id from start_ingestion_job) and includes a 'Raises' section for error conditions, which goes beyond the bare schema. However, it doesn't detail parameter formats or constraints beyond IDs being non-empty.

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 tool's purpose: '取り込みジョブのステータスと詳細情報を取得します' (Get ingestion job status and detailed information). It specifies the verb '取得します' (get) and resource '取り込みジョブ' (ingestion job), but does not explicitly differentiate from sibling tools like 'start_ingestion_job' beyond mentioning it as the source for the job ID.

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

Usage Guidelines3/5

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

The description implies usage by referencing 'start_ingestion_job' for obtaining the ingestion_job_id, suggesting it should be used after starting a job. However, it lacks explicit guidance on when to use this tool versus alternatives (e.g., monitoring vs. initiating jobs) or any exclusions, leaving some ambiguity.

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