Skip to main content
Glama
carlosahumada89

govrider-mcp-server

get_opportunity

Retrieve complete details for a specific government opportunity from your last enriched search, including strategic fit memo, political context, description, agency, and application URL.

Instructions

Get full details for a specific opportunity from the last enriched search. Returns the strategic fit memo, political context memo, full description, application URL, agency, keywords, and status. FREE - no extra credit cost. You must run search_enriched first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numberYesThe result number from the enriched search (1-10)

Implementation Reference

  • src/index.ts:223-224 (registration)
    Registration of the 'get_opportunity' tool via McpServer.registerTool, defining its name, description, and input schema.
    server.registerTool(
      'get_opportunity',
  • Input schema for get_opportunity: requires a single 'number' parameter (1-10) validated with Zod.
    inputSchema: {
      number: z
        .number()
        .min(1)
        .max(10)
        .describe('The result number from the enriched search (1-10)'),
    },
  • Handler function for get_opportunity: retrieves a cached opportunity by index (1-based) from the last enriched search result. Validates cache exists, checks bounds, then formats and returns the full opportunity details including strategic fit memo, political context, description, application URL, and keywords.
    async ({ number }) => {
      if (cachedMatches.length === 0) {
        return {
          content: [{
            type: 'text' as const,
            text: 'No search results available. Run **search_enriched** first to get matches, then use this tool to view details.',
          }],
          isError: true,
        }
      }
    
      const index = number - 1
      if (index >= cachedMatches.length) {
        return {
          content: [{
            type: 'text' as const,
            text: `Result #${number} does not exist. The last search returned ${cachedMatches.length} results. Choose a number between 1 and ${cachedMatches.length}.`,
          }],
          isError: true,
        }
      }
    
      const m = cachedMatches[index]
    
      const parts = [
        `# ${number}. ${m.displayTitle}`,
        '',
        `**Match Score:** ${m.matchPercentage}%`,
        '',
        `## Opportunity Details`,
        `**Official Title:** ${m.title}`,
        `**Agency:** ${m.agency}`,
        `**Region:** ${m.region}${m.country ? ` (${m.country})` : ''}`,
        `**Type:** ${m.funding_type ?? 'Unknown'}`,
        `**Estimated Value:** ${m.estimated_value ?? 'Not disclosed'}`,
        `**Deadline:** ${m.deadline ?? 'Unknown'}`,
        `**Status:** ${m.status}`,
        `**Last Verified:** ${m.last_verified_at ?? 'Unknown'}`,
        '',
        `## Strategic Fit Memo`,
        (m.context as string) ?? 'Not available',
        '',
        `## Political Context Memo`,
        (m.politicalContext as string) ?? 'Not available',
      ]
    
      if (m.description) {
        parts.push('', `## Description`, m.description as string)
      }
    
      if (m.application_url) {
        parts.push('', `## Apply`, `${m.application_url}`)
      }
    
      if (m.keywords && (m.keywords as string[]).length > 0) {
        parts.push('', `**Keywords:** ${(m.keywords as string[]).join(', ')}`)
      }
    
      return {
        content: [{ type: 'text' as const, text: parts.join('\n') }],
      }
    },
  • The cachedMatches global variable stores enriched search results so get_opportunity can serve full details without an extra API call
    let cachedMatches: Array<Record<string, unknown>> = []
Behavior3/5

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

With no annotations, the description carries the burden. It discloses cost behavior but does not explicitly address idempotency, side effects, or error conditions. As a simple get, it is minimally adequate.

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?

Three concise sentences: purpose, returns, and prerequisite/cost. No wasted words, well-structured.

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

Completeness5/5

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

Despite no output schema, the description lists all return fields (strategic fit memo, etc.) and states the data source (last enriched search). This provides sufficient context for the agent.

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 coverage is 100% and schema already describes the number parameter. The description adds no new detail beyond the schema, earning the baseline score.

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

Purpose5/5

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

The description clearly states the action ('Get full details for a specific opportunity') and the resource ('from the last enriched search'). It lists return fields, distinguishing it from siblings like search_enriched which performs the search.

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

Usage Guidelines4/5

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

Explicitly states the prerequisite ('You must run search_enriched first') and cost ('FREE - no extra credit cost'). However, it doesn't compare to search_opportunities or mention when not to use.

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/carlosahumada89/govrider-mcp-server'

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