Skip to main content
Glama

get_oke_work_request

Retrieve detailed status and progress information for Oracle Container Engine (OKE) work requests, including operation type, completion percentage, associated resources, and timing details.

Instructions

Get detailed information about a specific OKE work request.

Args:
    work_request_id: OCID of the work request

Returns:
    Detailed work request information including:
    - Operation type and status
    - Completion percentage
    - Associated resources and actions
    - Timing information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
work_request_idYes

Implementation Reference

  • Core handler function that fetches and formats OKE work request details using OCI ContainerEngineClient.get_work_request
    def get_work_request(container_engine_client: oci.container_engine.ContainerEngineClient,
                         work_request_id: str) -> Dict[str, Any]:
        """
        Get details of a specific work request.
    
        Args:
            container_engine_client: OCI ContainerEngine client
            work_request_id: OCID of the work request
    
        Returns:
            Details of the work request
        """
        try:
            wr = container_engine_client.get_work_request(work_request_id).data
    
            work_request_details = {
                "id": wr.id,
                "operation_type": wr.operation_type,
                "status": wr.status,
                "compartment_id": wr.compartment_id,
                "resources": [
                    {
                        "action_type": res.action_type if hasattr(res, 'action_type') else None,
                        "entity_type": res.entity_type if hasattr(res, 'entity_type') else None,
                        "identifier": res.identifier if hasattr(res, 'identifier') else None,
                        "entity_uri": res.entity_uri if hasattr(res, 'entity_uri') else None,
                    }
                    for res in wr.resources
                ] if hasattr(wr, 'resources') and wr.resources else [],
                "percent_complete": wr.percent_complete if hasattr(wr, 'percent_complete') else None,
                "time_accepted": str(wr.time_accepted) if hasattr(wr, 'time_accepted') and wr.time_accepted else None,
                "time_started": str(wr.time_started) if hasattr(wr, 'time_started') and wr.time_started else None,
                "time_finished": str(wr.time_finished) if hasattr(wr, 'time_finished') and wr.time_finished else None,
            }
    
            logger.info(f"Retrieved details for work request {work_request_id}")
            return work_request_details
    
        except Exception as e:
            logger.exception(f"Error getting work request details: {e}")
            raise
  • MCP tool registration with @mcp.tool(name="get_oke_work_request"), wraps the get_work_request handler from tools.oke module and adds logging/error handling via mcp_tool_wrapper decorator
    @mcp.tool(name="get_oke_work_request")
    @mcp_tool_wrapper(
        start_msg="Getting details for work request {work_request_id}...",
        error_prefix="Error getting work request details"
    )
    async def mcp_get_oke_work_request(ctx: Context, work_request_id: str) -> Dict[str, Any]:
        """
        Get detailed information about a specific OKE work request.
    
        Args:
            work_request_id: OCID of the work request
    
        Returns:
            Detailed work request information including:
            - Operation type and status
            - Completion percentage
            - Associated resources and actions
            - Timing information
        """
        return get_work_request(oci_clients["container_engine"], work_request_id)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves 'detailed information' and lists return fields, but doesn't cover critical aspects like whether it's a read-only operation, error handling, authentication requirements, rate limits, or latency. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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

Conciseness5/5

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

The description is well-structured and concise. It starts with a clear purpose statement, followed by 'Args:' and 'Returns:' sections that efficiently document inputs and outputs. Every sentence adds value without redundancy, making it easy to scan and understand.

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

Completeness3/5

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

Given the tool's moderate complexity (single parameter, no output schema, no annotations), the description is adequate but incomplete. It covers the purpose and parameter semantics well, but lacks behavioral details and usage guidelines. Without annotations or output schema, it should ideally provide more context on error cases or response structure to be fully complete.

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?

The description adds meaningful context beyond the input schema. The schema has 0% description coverage (only a title 'Work Request Id'), but the description specifies that 'work_request_id' is an 'OCID of the work request', clarifying its format and purpose. Since there's only one parameter, this is sufficient to compensate for the low schema coverage.

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 detailed information about a specific OKE work request.' It specifies the verb ('Get') and resource ('OKE work request'), making it easy to understand. However, it doesn't explicitly differentiate from sibling tools like 'list_oke_work_requests' or 'get_oke_cluster', which would be needed for a perfect score.

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 sibling tools like 'list_oke_work_requests' for listing multiple work requests or other 'get_' tools for different resources. There's no context on prerequisites, such as needing a specific work request ID, or exclusions.

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/jopsis/mcp-server-oci'

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