Skip to main content
Glama
GoCoder7

OCI MCP Server

by GoCoder7

oci-manage

Manage Oracle Cloud Infrastructure resources including compute, storage, networking, databases, and monitoring through a unified interface.

Instructions

Manage Oracle Cloud Infrastructure resources including compute, storage, networking, databases, and monitoring.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serviceYesThe OCI service to interact with
actionYesThe action to perform
resourceTypeYesThe type of resource (e.g., instances, buckets, vcns)
resourceIdNoThe OCID of the resource (for specific operations)
compartmentIdNoThe compartment OCID (optional, defaults to tenancy)
parametersNoAdditional parameters for the operation

Implementation Reference

  • The primary handler function for the 'oci-manage' tool. It validates input parameters, checks for required OCI environment variables, returns credential setup help if missing, and provides a mock response indicating the intended OCI operation.
    private async handleOCIManage(args: any) {
      // Basic validation
      if (!args.service || !args.action || !args.resourceType) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Missing required parameters: service, action, resourceType'
        );
      }
    
      // Check if OCI credentials are configured
      const requiredEnvVars = [
        'OCI_TENANCY_ID',
        'OCI_USER_ID', 
        'OCI_KEY_FINGERPRINT',
        'OCI_PRIVATE_KEY_PATH',
        'OCI_REGION'
      ];
    
      const missingVars = requiredEnvVars.filter(varName => !process.env[varName]);
      
      if (missingVars.length > 0) {
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                success: false,
                message: `OCI credentials not configured. Please set the following environment variables: ${missingVars.join(', ')}`,
                help: {
                  setup: 'Configure OCI authentication by setting environment variables',
                  variables: {
                    OCI_TENANCY_ID: 'Your OCI tenancy OCID',
                    OCI_USER_ID: 'Your OCI user OCID', 
                    OCI_KEY_FINGERPRINT: 'Your API key fingerprint',
                    OCI_PRIVATE_KEY_PATH: 'Path to your private key file',
                    OCI_REGION: 'Your preferred OCI region (e.g., us-ashburn-1)'
                  },
                  example: {
                    service: 'compute',
                    action: 'list', 
                    resourceType: 'instances',
                    compartmentId: 'ocid1.compartment.oc1..aaaaaaaa...'
                  }
                }
              }, null, 2)
            }
          ]
        };
      }
    
      // For now, return a mock response indicating the operation would be performed
      const response = {
        success: true,
        service: args.service,
        action: args.action,
        resourceType: args.resourceType,
        resourceId: args.resourceId,
        compartmentId: args.compartmentId || process.env.OCI_COMPARTMENT_ID || process.env.OCI_TENANCY_ID,
        message: `Would ${args.action} ${args.resourceType} in ${args.service} service`,
        note: 'This is a placeholder response. Full OCI integration requires the complete implementation.',
        credentials_configured: true,
        region: process.env.OCI_REGION
      };
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(response, null, 2)
          }
        ]
      };
    }
  • Defines the input schema for the 'oci-manage' tool, including properties for service, action, resourceType (required), and optional fields like resourceId, compartmentId, and parameters.
    inputSchema: {
      type: 'object',
      properties: {
        service: {
          type: 'string',
          enum: ['compute', 'storage', 'network', 'database', 'monitoring', 'identity'],
          description: 'The OCI service to interact with'
        },
        action: {
          type: 'string',
          enum: ['list', 'get', 'create', 'update', 'delete', 'start', 'stop'],
          description: 'The action to perform'
        },
        resourceType: {
          type: 'string',
          description: 'The type of resource (e.g., instances, buckets, vcns)'
        },
        resourceId: {
          type: 'string',
          description: 'The OCID of the resource (for specific operations)'
        },
        compartmentId: {
          type: 'string',
          description: 'The compartment OCID (optional, defaults to tenancy)'
        },
        parameters: {
          type: 'object',
          description: 'Additional parameters for the operation'
        }
      },
      required: ['service', 'action', 'resourceType']
    }
  • Registers the 'oci-manage' tool in the ListTools response, providing its name, description, and input schema.
      return {
        tools: [
          {
            name: 'oci-manage',
            description: 'Manage Oracle Cloud Infrastructure resources including compute, storage, networking, databases, and monitoring.',
            inputSchema: {
              type: 'object',
              properties: {
                service: {
                  type: 'string',
                  enum: ['compute', 'storage', 'network', 'database', 'monitoring', 'identity'],
                  description: 'The OCI service to interact with'
                },
                action: {
                  type: 'string',
                  enum: ['list', 'get', 'create', 'update', 'delete', 'start', 'stop'],
                  description: 'The action to perform'
                },
                resourceType: {
                  type: 'string',
                  description: 'The type of resource (e.g., instances, buckets, vcns)'
                },
                resourceId: {
                  type: 'string',
                  description: 'The OCID of the resource (for specific operations)'
                },
                compartmentId: {
                  type: 'string',
                  description: 'The compartment OCID (optional, defaults to tenancy)'
                },
                parameters: {
                  type: 'object',
                  description: 'Additional parameters for the operation'
                }
              },
              required: ['service', 'action', 'resourceType']
            }
          }
        ]
      };
    });
  • Registers the handler dispatch for 'oci-manage' tool calls within the CallToolRequestHandler switch statement.
    switch (name) {
      case 'oci-manage':
        return await this.handleOCIManage(args);
      default:
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'manage' but doesn't disclose behavioral traits like authentication needs, rate limits, side effects, or error handling. The broad scope suggests complex operations, but no specifics are given, leaving significant gaps in understanding how the tool behaves.

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 a single, efficient sentence that front-loads the purpose. It's appropriately sized for a high-level tool, though it could be more structured (e.g., breaking down 'manage'). No wasted words, but it's brief given the tool's complexity.

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

Completeness2/5

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

Given the tool's high complexity (6 parameters, no annotations, no output schema), the description is incomplete. It doesn't address behavioral aspects, output expectations, or error handling. The schema covers parameters, but the description fails to provide necessary context for safe and effective use.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema documents all parameters well. The description adds no meaning beyond the schema—it lists service categories but doesn't explain parameter interactions or semantics. Baseline 3 is appropriate as the schema does the heavy lifting, but the description doesn't compensate or enhance understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool manages OCI resources across multiple service categories, which provides a general purpose. However, it's vague about the specific verb ('manage' is broad) and doesn't distinguish from siblings (though none exist, it still lacks specificity). It lists resource types but doesn't clarify what 'manage' entails beyond the schema's action enum.

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?

No guidance on when to use this tool versus alternatives is provided. The description implies it's for OCI resource management but offers no context on prerequisites, limitations, or typical scenarios. With no siblings, this is less critical, but still lacks any usage context.

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

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