Skip to main content
Glama

search_properties

Search biological ontology properties by label or ID across multiple ontologies, with filters for exact matches, definitions, and property types.

Instructions

Search ontology properties by their labels and IDs

Input Schema

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

Implementation Reference

  • The primary handler function for the 'search_properties' tool. It validates input arguments using isValidSearchPropertiesArgs, constructs query parameters for the BioOntology API's /property_search endpoint, fetches the data, and returns formatted JSON results or an error message.
    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 schema definition including name, description, and detailed inputSchema with properties, types, descriptions, and required fields, registered in the tools list for ListToolsRequestSchema.
    {
      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'],
      },
    },
  • src/index.ts:703-704 (registration)
    The switch case registration in the CallToolRequestSchema handler that routes calls to the 'search_properties' tool to its handler function.
    case 'search_properties':
      return this.handleSearchProperties(args);
  • Helper validation function (type guard) that checks if input arguments match the expected structure for the search_properties tool, used in the handler for input validation.
    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))
      );
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool searches ontology properties but doesn't describe key behaviors like pagination handling (implied by 'page' and 'pagesize' parameters), rate limits, authentication needs, error conditions, or the format of returned results. For a search tool with 10 parameters, this leaves significant gaps in understanding how the tool behaves in practice.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. It directly states what the tool does ('Search ontology properties by their labels and IDs') and earns its place by being clear and to-the-point, with no redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (10 parameters, no annotations, no output schema), the description is incomplete. It doesn't address behavioral aspects like pagination, result formatting, or error handling, which are critical for a search tool. Without annotations or an output schema, the description should compensate by providing more context on how the tool operates and what to expect from results, but it fails to do so.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema already documents all 10 parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema—it doesn't explain parameter interactions, default behaviors beyond schema defaults, or usage examples. This meets the baseline for high schema coverage but doesn't provide extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Search ontology properties by their labels and IDs'. It specifies the verb ('search'), resource ('ontology properties'), and scope ('by their labels and IDs'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'search_ontologies' or 'search_terms', which is why it doesn't achieve a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'search_ontologies' or 'search_terms', nor does it specify prerequisites or contexts for usage. The agent must infer usage from the tool name and parameters alone, which is insufficient for optimal tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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

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