Skip to main content
Glama

anytype_get_property

Retrieve a specific property from Anytype objects by providing the space ID and property ID, enabling access to object data through the Anytype API.

Instructions

Obtiene una propiedad específica

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
space_idYesID del espacio
property_idYesID de la propiedad

Implementation Reference

  • The handler function `handleGetProperty` that implements the core logic for the 'anytype_get_property' tool. It validates the required parameters (space_id and property_id), makes a GET request to the Anytype API endpoint `/v1/spaces/{space_id}/properties/{property_id}`, and returns the response as formatted text.
    export async function handleGetProperty(args: any) { const { space_id, property_id } = args; if (!space_id || !property_id) { return { content: [{ type: 'text', text: JSON.stringify({ error: 'Missing required parameters', message: 'Fields "space_id" and "property_id" are required for getting a property', provided_parameters: Object.keys(args) }, null, 2) }] }; } const response = await makeRequest(`/v1/spaces/${space_id}/properties/${property_id}`); return { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] }; }
  • The schema definition for the 'anytype_get_property' tool, including input schema with required fields space_id and property_id.
    { name: 'anytype_get_property', description: 'Obtiene una propiedad específica', inputSchema: { type: 'object', properties: { space_id: { type: 'string', description: 'ID del espacio' }, property_id: { type: 'string', description: 'ID de la propiedad' }, }, required: ['space_id', 'property_id'], }, },
  • src/index.ts:138-139 (registration)
    Registration of the tool in the main MCP server request handler switch statement, which routes calls to the handleGetProperty function.
    case 'anytype_get_property': return await handleGetProperty(args);
  • src/index.ts:88-88 (registration)
    Inclusion of propertyTools (containing the schema) into the combined tools list served by the MCP server.
    ...propertyTools,
  • src/index.ts:46-52 (registration)
    Import of the handleGetProperty handler function from the properties handler module.
    import { handleListProperties, handleGetProperty, handleCreateProperty, handleUpdateProperty, handleDeleteProperty } from './handlers/properties.js';

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