Skip to main content
Glama
ConsentirDev

BuyICT MCP Server

by ConsentirDev

search_opportunities

Find Australian Government ICT procurement opportunities across multiple marketplaces using keyword searches and filters to identify relevant contracts.

Instructions

Search for procurement opportunities on BuyICT with optional filters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordNoSearch term to filter opportunities
marketplaceNoFilter by marketplace code (e.g., PCS, SMP, CMP, LH, TMP, DC, HMP)
page_sizeNoNumber of results per page (default: 15)
pageNoPage number (default: 1)

Implementation Reference

  • The core handler function for the search_opportunities tool, which fetches the opportunities page from ServiceNow and extracts the relevant widget data containing opportunities.
    async searchOpportunities(
      params: OpportunitySearchParams
    ): Promise<OpportunitySearchResult> {
      // TODO: Implement actual API call once we discover the correct endpoint
      // For now, this is a placeholder that returns the structure
    
      console.warn(
        'searchOpportunities is not fully implemented yet. ' +
        'Need to discover the correct API endpoint for fetching opportunity data.'
      );
    
      // Try fetching the page to get widget data
      const pageData = await this.fetchOpportunitiesPage();
    
      // Extract widget data
      const opportunitiesWidget = this.findWidget(pageData, 'Opportunities V2');
    
      if (opportunitiesWidget?.data) {
        const widgetData = opportunitiesWidget.data;
    
        return {
          items: widgetData.pageItems || [],
          total_count: widgetData.totalItems || 0,
          page: params.page || 1,
          page_size: params.page_size || 15,
          total_pages: Math.ceil((widgetData.totalItems || 0) / (params.page_size || 15))
        };
      }
    
      return {
        items: [],
        total_count: 0,
        page: 1,
        page_size: 15,
        total_pages: 0
      };
    }
  • Input schema defining the parameters for the search_opportunities tool: keyword, marketplace, page_size, and page.
    inputSchema: {
      type: 'object',
      properties: {
        keyword: {
          type: 'string',
          description: 'Search term to filter opportunities'
        },
        marketplace: {
          type: 'string',
          description: 'Filter by marketplace code (e.g., PCS, SMP, CMP, LH, TMP, DC, HMP)',
          enum: config.marketplaces.map(m => m.code)
        },
        page_size: {
          type: 'number',
          description: 'Number of results per page (default: 15)',
          minimum: 1,
          maximum: 100,
          default: 15
        },
        page: {
          type: 'number',
          description: 'Page number (default: 1)',
          minimum: 1,
          default: 1
        }
      }
    }
  • src/index.ts:53-83 (registration)
    Tool object registration in the TOOLS array used for listing available tools via ListToolsRequest.
    {
      name: 'search_opportunities',
      description: 'Search for procurement opportunities on BuyICT with optional filters',
      inputSchema: {
        type: 'object',
        properties: {
          keyword: {
            type: 'string',
            description: 'Search term to filter opportunities'
          },
          marketplace: {
            type: 'string',
            description: 'Filter by marketplace code (e.g., PCS, SMP, CMP, LH, TMP, DC, HMP)',
            enum: config.marketplaces.map(m => m.code)
          },
          page_size: {
            type: 'number',
            description: 'Number of results per page (default: 15)',
            minimum: 1,
            maximum: 100,
            default: 15
          },
          page: {
            type: 'number',
            description: 'Page number (default: 1)',
            minimum: 1,
            default: 1
          }
        }
      }
    },
  • src/index.ts:138-150 (registration)
    Dispatch logic in the CallToolRequest handler that routes search_opportunities calls to the ServiceNowClient handler.
    case 'search_opportunities': {
      const params = args as OpportunitySearchParams;
      const result = await snClient.searchOpportunities(params);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Helper utility function used within searchOpportunities to locate the 'Opportunities V2' widget in the ServiceNow page response.
    private findWidget(pageData: ServiceNowPageResponse, widgetName: string) {
      for (const container of pageData.result.containers || []) {
        for (const row of container.rows || []) {
          for (const column of row.columns || []) {
            for (const widgetInstance of column.widgets || []) {
              if (widgetInstance.widget.name === widgetName) {
                return widgetInstance.widget;
              }
            }
          }
        }
      }
      return null;
    }
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 for opportunities but doesn't describe key behaviors such as pagination handling (implied by 'page' and 'page_size' parameters), rate limits, authentication needs, or what the search results look like. This leaves significant gaps for a tool with 4 parameters and no output schema.

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 directly states the tool's purpose without any unnecessary words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 of a search tool with 4 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain the return format, error handling, or how results are structured, which are critical for an agent to use the tool effectively. The high schema coverage helps, but the description doesn't compensate for the lack of behavioral and output context.

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 schema already documents all parameters thoroughly. The description adds minimal value by mentioning 'optional filters', which aligns with the schema but doesn't provide additional semantic context or usage examples beyond what's in the parameter descriptions.

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 action ('Search for procurement opportunities') and the target resource ('on BuyICT'), which provides a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'get_opportunity_details' or 'list_marketplaces' beyond the 'search' action, so it lacks sibling differentiation for 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 mentions 'optional filters' which implies some context for usage, but it doesn't provide explicit guidance on when to use this tool versus alternatives like 'get_opportunity_details' or 'list_marketplaces'. No exclusions or specific scenarios are outlined, leaving the agent with minimal direction.

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/ConsentirDev/buyict.mcp'

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