Skip to main content
Glama
dizzydes

0pi-mcp-server

by dizzydes

create_object

Save objects to ephemeral cloud storage for temporary data sharing and workflow bridging. Get a shareable URL that expires in 2 hours to store reasoning states, JSON structures, or session data.

Instructions

Save objects to ephemeral cloud storage - Store your reasoning state, large JSON structures, or any data to get a shareable URL. Perfect for: caching contexts before token limits, bridging multi-agent workflows, storing intermediate results, sharing data between sessions, or temporary data storage. Returns a shareable URL valid for 2 hours with auto-expiring data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesYour agent identifier (e.g., "claude-coder", "gpt-researcher")
dataYesThe data to save - can be an object, array, or string
intentNoBrief description of why you are saving this data (helps with debugging and analytics)
ttl_secondsNoTime-to-live in seconds (max 7200 = 2 hours)

Implementation Reference

  • Handler logic for create_object tool, which uses createSharedWorkspace to communicate with the OPI API.
    if (name === 'create_object' || name === 'create_shared_workspace') {
      const { agent_id, data, intent, ttl_seconds = 7200 } = args;
    
      if (!agent_id || !data) {
        throw new Error('agent_id and data are required');
      }
    
      const result = await createSharedWorkspace(agent_id, data, intent, ttl_seconds);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              success: true,
              object_id: result.workspace_id,
              url: result.url,
              expires_in: result.expires_in,
              message: `Object saved successfully. Share this URL: ${result.url}`
            }, null, 2)
          }
        ]
      };
    }
  • Definition and schema registration for the create_object tool.
    {
      name: 'create_object',
      description: 'Save objects to ephemeral cloud storage - Store your reasoning state, large JSON structures, or any data to get a shareable URL. Perfect for: caching contexts before token limits, bridging multi-agent workflows, storing intermediate results, sharing data between sessions, or temporary data storage. Returns a shareable URL valid for 2 hours with auto-expiring data.',
      inputSchema: {
        type: 'object',
        properties: {
          agent_id: {
            type: 'string',
            description: 'Your agent identifier (e.g., "claude-coder", "gpt-researcher")'
          },
          data: {
            description: 'The data to save - can be an object, array, or string'
          },
          intent: {
            type: 'string',
            description: 'Brief description of why you are saving this data (helps with debugging and analytics)'
          },
          ttl_seconds: {
            type: 'number',
            description: 'Time-to-live in seconds (max 7200 = 2 hours)',
            default: 7200
          }
        },
        required: ['agent_id', 'data']
      }
    },
  • Helper function createSharedWorkspace that performs the actual API request to save the object.
    async function createSharedWorkspace(agent_id, data, intent = null, ttl_seconds = 7200) {
      try {
        const payload = {
          agent_id,
          data,
          intent,
          ttl_seconds,
          payload_type: typeof data === 'string' ? 'text' : 'json'
        };
    
        const payloadSize = JSON.stringify(payload).length;
    
        const response = await axios.post(`${API_BASE_URL}/dump`, payload, {
          headers: {
            'Content-Type': 'application/json'
          },
          timeout: 10000
        });
    
        // Log successful workspace creation
        logEvent('workspace_created', {
          tool_name: 'create_shared_workspace',
          agent_id,
          workspace_id: response.data.workspace_id,
          workspace_url: response.data.url,
          payload_size: payloadSize,
          intent
        });
    
        return response.data;
      } catch (error) {
        // Log error
        logEvent('workspace_creation_failed', {
          tool_name: 'create_shared_workspace',
          agent_id,
          error: error.message,
          metadata: { stack: error.stack }
        });
    
        throw new Error(`Failed to create workspace: ${error.message}`);
      }
    }
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/dizzydes/0pi-mcp-server'

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