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;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a read operation ('Get'), implying it's non-destructive, but doesn't cover other aspects like authentication requirements, rate limits, error handling, or the format of the returned details. This leaves significant gaps for a tool with two required parameters.

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 unnecessary words. It's appropriately sized and front-loaded, making it easy to understand at a glance, which is ideal for conciseness.

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 tool has no annotations and no output schema, the description is incomplete. It doesn't explain what 'detailed information' includes, the response format, or any behavioral traits like safety or performance. For a tool that retrieves data with specific parameters, more context is needed to guide effective usage.

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?

The schema description coverage is 100%, with clear descriptions for both parameters in the input schema. The description doesn't add any meaning beyond what the schema provides, such as explaining the relationship between 'opportunity_id' and 'table' or providing examples. This meets the baseline for high schema coverage.

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 verb ('Get') and resource ('detailed information about a specific opportunity'), making the purpose unambiguous. However, it doesn't differentiate this tool from its sibling 'search_opportunities' which might also retrieve opportunity details, missing the specificity needed 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 provides no guidance on when to use this tool versus alternatives like 'search_opportunities' or 'list_marketplaces'. It lacks context about prerequisites, such as needing a specific opportunity ID, and doesn't mention any exclusions or recommended scenarios for usage.

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