Skip to main content
Glama
ConsentirDev

BuyICT MCP Server

by ConsentirDev

get_opportunity_details

Retrieve comprehensive details for specific Australian Government ICT procurement opportunities, including contract information and procurement channels, by providing the opportunity ID and source table.

Instructions

Get detailed information about a specific opportunity

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opportunity_idYesThe sys_id of the opportunity
tableYesThe source table name (e.g., u_pcs_procurement, u_smp_procurement)

Implementation Reference

  • The core handler function that executes the tool logic by fetching opportunity details from the ServiceNow API using the specified table and opportunity ID.
    async getOpportunityDetails( opportunityId: string, table: string ): Promise<OpportunityDetails | null> { try { const response = await this.client.get( `/api/now/table/${table}/${opportunityId}` ); return response.data.result; } catch (error) { console.error('Error fetching opportunity details:', error); return null; } }
  • src/index.ts:84-101 (registration)
    Registers the 'get_opportunity_details' tool in the TOOLS array, including name, description, and input schema for MCP.
    { name: 'get_opportunity_details', description: 'Get detailed information about a specific opportunity', inputSchema: { type: 'object', properties: { opportunity_id: { type: 'string', description: 'The sys_id of the opportunity' }, table: { type: 'string', description: 'The source table name (e.g., u_pcs_procurement, u_smp_procurement)' } }, required: ['opportunity_id', 'table'] } },
  • MCP server request handler that processes 'get_opportunity_details' tool calls, validates arguments, invokes the client method, and formats the response.
    case 'get_opportunity_details': { const { opportunity_id, table } = args as { opportunity_id: string; table: string; }; const details = await snClient.getOpportunityDetails(opportunity_id, table); if (!details) { return { content: [ { type: 'text', text: `Opportunity not found: ${opportunity_id} in table ${table}`, }, ], isError: true, }; } return { content: [ { type: 'text', text: JSON.stringify(details, null, 2), }, ], }; }
  • TypeScript interface defining the expected structure of the opportunity details returned by the tool.
    export interface OpportunityDetails extends OpportunityItem { description?: string; requirements?: string; contact_name?: string; contact_email?: string; [key: string]: any; }

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