anytype_get_object
Retrieve a specific object by its ID using the Anytype MCP Server. Input the space ID and object ID to access detailed object information.
Instructions
Obtiene un objeto específico por su ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| object_id | Yes | ID del objeto | |
| space_id | Yes | ID del espacio |
Implementation Reference
- src/handlers/objects.ts:113-120 (handler)The main handler function `handleGetObject` that implements the core logic for the `anytype_get_object` tool by making an API request to retrieve the object details from Anytype./** * Get a specific object */ 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) }] }; }
- src/tools/objects.ts:33-44 (schema)Defines the input schema, description, and name for the `anytype_get_object` tool, including required parameters `space_id` and `object_id`.{ 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)Registers the tool handler in the MCP server's request handler switch statement, dispatching `anytype_get_object` calls to `handleGetObject`.case 'anytype_get_object': return await handleGetObject(args);
- src/index.ts:85-93 (registration)Combines all tool definitions including `objectTools` (which contains `anytype_get_object`) into the tools list provided to the MCP ListToolsRequestHandler.const tools = [ ...spaceTools, ...objectTools, ...propertyTools, ...typeTools, ...tagTools, ...templateTools, ...listTools, ];
- src/index.ts:16-16 (registration)Imports the `objectTools` array from tools/objects.ts, which includes the `anytype_get_object` tool definition.import { objectTools } from './tools/objects.js';