Skip to main content
Glama
dizzydes

0pi-mcp-server

by dizzydes

get_object

Retrieve stored data from cloud storage using its object ID. Access previously saved information across sessions or workflows for continued processing.

Instructions

Retrieve data from cloud storage using its ID. Use this to read data that another agent (or yourself) saved previously.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
object_idYesThe object ID (8-character identifier from the URL)

Implementation Reference

  • Tool handler for 'get_object', which retrieves data via the 'getWorkspace' function.
    if (name === 'get_object' || name === 'get_shared_workspace') {
      const { object_id, workspace_id } = args;
      const id = object_id || workspace_id;
    
      if (!id) {
        throw new Error('object_id is required');
      }
    
      const data = await getWorkspace(id);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              success: true,
              data: data
            }, null, 2)
          }
        ]
      };
    }
  • Schema definition for the 'get_object' tool in the ListTools response.
    {
      name: 'get_object',
      description: 'Retrieve data from cloud storage using its ID. Use this to read data that another agent (or yourself) saved previously.',
      inputSchema: {
        type: 'object',
        properties: {
          object_id: {
            type: 'string',
            description: 'The object ID (8-character identifier from the URL)'
          }
        },
        required: ['object_id']
      }
    }
  • The helper function 'getWorkspace' that performs the API call to retrieve the object data.
    /**
     * Retrieve workspace data
     */
    async function getWorkspace(workspace_id) {
      try {
        const response = await axios.get(`${API_BASE_URL}/w/${workspace_id}`, {
          timeout: 5000
        });
    
        // Log successful retrieval
        logEvent('workspace_retrieved', {
          tool_name: 'get_shared_workspace',
          workspace_id
        });
    
        return response.data;
      } catch (error) {
        // Log error
        logEvent('workspace_retrieval_failed', {
          tool_name: 'get_shared_workspace',
          workspace_id,
          error: error.message
        });
    
        if (error.response?.status === 404) {
          throw new Error('Workspace not found or expired');
        }
        throw new Error(`Failed to retrieve 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