Skip to main content
Glama

anytype_get_object

Retrieve a specific object from Anytype by providing its space and object IDs, enabling access to stored content and data.

Instructions

Obtiene un objeto específico por su ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
space_idYesID del espacio
object_idYesID del objeto

Implementation Reference

  • The core handler function that executes the tool logic: extracts space_id and object_id from arguments, makes an API GET request to retrieve the object, and returns the response as formatted text content.
    export async function handleGetObject(args: any) { const { space_id, object_id } = args; const response = await makeRequest(`/v1/spaces/${space_id}/objects/${object_id}`); return { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] }; }
  • The tool definition including name, description, and inputSchema for validation (requires space_id and object_id). Part of the objectTools array.
    { name: 'anytype_get_object', description: 'Obtiene un objeto específico por su ID', inputSchema: { type: 'object', properties: { space_id: { type: 'string', description: 'ID del espacio' }, object_id: { type: 'string', description: 'ID del objeto' }, }, required: ['space_id', 'object_id'], }, },
  • src/index.ts:126-127 (registration)
    Registration in the main CallToolRequestHandler switch statement: dispatches tool calls matching 'anytype_get_object' to the handleGetObject function.
    case 'anytype_get_object': return await handleGetObject(args);
  • src/index.ts:85-93 (registration)
    Combines all tool schemas into the tools array (via spread of objectTools which includes anytype_get_object schema) for ListToolsRequestHandler response.
    const tools = [ ...spaceTools, ...objectTools, ...propertyTools, ...typeTools, ...tagTools, ...templateTools, ...listTools, ];
  • Uses the shared makeRequest utility from utils.ts to perform the HTTP request (imported at line 1). Note: full makeRequest implementation is in src/utils.ts.
    const response = await makeRequest(`/v1/spaces/${space_id}/objects/${object_id}`); return { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] };

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/cryptonahue/mcp-anytype'

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