Skip to main content
Glama

search_properties

Search and retrieve ontology properties by labels, IDs, and specific criteria across biological ontologies. Filter results by exact matches, definitions, property types, and more for precise data exploration.

Instructions

Search ontology properties by their labels and IDs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
also_search_viewsNoInclude ontology views (default: false)
includeNoAttributes to include (default: label,labelGenerated,definition,parents)
ontologiesNoComma-separated list of ontology acronyms
ontology_typesNoOntology types to include (e.g., ONTOLOGY,VALUE_SET_COLLECTION)
pageNoPage number (default: 1)
pagesizeNoResults per page (default: 50, max: 500)
property_typesNoProperty types (object,annotation,datatype)
queryYesSearch query for properties
require_definitionsNoOnly return properties with definitions (default: false)
require_exact_matchNoRequire exact match (default: false)

Implementation Reference

  • The handler function that validates input arguments and calls the BioOntology API /property_search endpoint to search for ontology properties.
    private async handleSearchProperties(args: any) { if (!isValidSearchPropertiesArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid search properties arguments'); } try { const params: any = { q: args.query, apikey: this.apiKey, }; // Add optional parameters if (args.ontologies) params.ontologies = args.ontologies; if (args.require_exact_match !== undefined) params.require_exact_match = args.require_exact_match; if (args.also_search_views !== undefined) params.also_search_views = args.also_search_views; if (args.require_definitions !== undefined) params.require_definitions = args.require_definitions; if (args.include) params.include = args.include; if (args.ontology_types) params.ontology_types = args.ontology_types; if (args.property_types) params.property_types = args.property_types; if (args.page) params.page = args.page; if (args.pagesize) params.pagesize = args.pagesize; const response = await this.apiClient.get('/property_search', { params }); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: `Error searching properties: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } }
  • The tool registration including name, description, and input schema definition for the search_properties tool.
    { name: 'search_properties', description: 'Search ontology properties by their labels and IDs', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search query for properties' }, ontologies: { type: 'string', description: 'Comma-separated list of ontology acronyms' }, require_exact_match: { type: 'boolean', description: 'Require exact match (default: false)' }, also_search_views: { type: 'boolean', description: 'Include ontology views (default: false)' }, require_definitions: { type: 'boolean', description: 'Only return properties with definitions (default: false)' }, include: { type: 'string', description: 'Attributes to include (default: label,labelGenerated,definition,parents)' }, ontology_types: { type: 'string', description: 'Ontology types to include (e.g., ONTOLOGY,VALUE_SET_COLLECTION)' }, property_types: { type: 'string', description: 'Property types (object,annotation,datatype)' }, page: { type: 'number', description: 'Page number (default: 1)', minimum: 1 }, pagesize: { type: 'number', description: 'Results per page (default: 50, max: 500)', minimum: 1, maximum: 500 }, }, required: ['query'], },
  • Type guard function for validating input arguments to the search_properties tool.
    const isValidSearchPropertiesArgs = ( args: any ): args is { query: string; ontologies?: string; require_exact_match?: boolean; also_search_views?: boolean; require_definitions?: boolean; include?: string; ontology_types?: string; property_types?: string; page?: number; pagesize?: number; } => { return ( typeof args === 'object' && args !== null && typeof args.query === 'string' && (args.ontologies === undefined || typeof args.ontologies === 'string') && (args.require_exact_match === undefined || typeof args.require_exact_match === 'boolean') && (args.also_search_views === undefined || typeof args.also_search_views === 'boolean') && (args.require_definitions === undefined || typeof args.require_definitions === 'boolean') && (args.include === undefined || typeof args.include === 'string') && (args.ontology_types === undefined || typeof args.ontology_types === 'string') && (args.property_types === undefined || typeof args.property_types === 'string') && (args.page === undefined || (typeof args.page === 'number' && args.page > 0)) && (args.pagesize === undefined || (typeof args.pagesize === 'number' && args.pagesize > 0 && args.pagesize <= 500)) ); };
  • src/index.ts:703-704 (registration)
    The switch case that routes calls to the search_properties handler.
    case 'search_properties': return this.handleSearchProperties(args);

Other Tools

Related 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/Augmented-Nature/BioOntology-MCP-Server'

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