Skip to main content
Glama
TylerIlunga

Procore MCP Server

Full-Text Search Across Endpoints

procore_search_endpoints
Read-onlyIdempotent

Search across all Procore API endpoints using terms like 'RFI' or 'budget'. Returns ranked matches to quickly locate the desired endpoint.

Instructions

Full-text search across every Procore API endpoint summary, tag, and path. Use to quickly locate the right endpoint when you know roughly what you're looking for — e.g. 'RFI', 'budget', 'punch list', 'submittal'. Returns a JSON array of matches ranked by relevance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch term, e.g. 'RFI', 'budget', 'punch list', 'submittal'

Implementation Reference

  • Handler function that calls the catalog searchEndpoints() service and formats results into a human-readable string response.
    export async function handleSearchEndpoints(args: {
      query: string;
    }): Promise<string> {
      const results = searchEndpoints(args.query);
    
      if (results.length === 0) {
        return `No endpoints found matching "${args.query}". Try different search terms or use procore_discover_categories to browse.`;
      }
    
      const lines: string[] = [
        `Found ${results.length} endpoints matching "${args.query}":\n`,
      ];
    
      for (const e of results) {
        lines.push(
          `- **${e.method}** \`${e.path}\` — ${e.summary}`
        );
        lines.push(
          `  Category: ${e.category} / ${e.module} | operationId: \`${e.operationId}\``
        );
      }
    
      lines.push(
        "\nUse procore_get_endpoint_details with an operationId for full parameter info."
      );
    
      return lines.join("\n");
    }
  • Core search logic: scores catalog entries by matching query terms against summary, tag, and path, then returns top 50 results ranked by relevance.
    export function searchEndpoints(query: string): CatalogEntry[] {
      const catalog = loadCatalog();
      const terms = query.toLowerCase().split(/\s+/);
    
      // Score each entry
      const scored = catalog.map((entry) => {
        const summaryLower = entry.summary.toLowerCase();
        const tagLower = entry.tag.toLowerCase();
        const pathLower = entry.path.toLowerCase();
    
        let score = 0;
        for (const term of terms) {
          if (summaryLower.includes(term)) score += 10;
          if (tagLower.includes(term)) score += 5;
          if (pathLower.includes(term)) score += 3;
        }
    
        // Boost exact matches
        if (summaryLower === query.toLowerCase()) score += 50;
    
        return { entry, score };
      });
    
      return scored
        .filter((s) => s.score > 0)
        .sort((a, b) => b.score - a.score)
        .slice(0, 50)
        .map((s) => s.entry);
    }
  • Input schema for the tool: a single required 'query' string parameter validated via Zod.
    inputSchema: {
      query: z
        .string()
        .describe(
          "Search term, e.g. 'RFI', 'budget', 'punch list', 'submittal'"
        ),
    },
  • Registration of the 'procore_search_endpoints' tool on the MCP server, wiring the handler and schema together.
    server.registerTool(
      "procore_search_endpoints",
      {
        title: "Full-Text Search Across Endpoints",
        description:
          "Full-text search across every Procore API endpoint summary, tag, and path. " +
          "Use to quickly locate the right endpoint when you know roughly what you're " +
          "looking for — e.g. 'RFI', 'budget', 'punch list', 'submittal'. Returns " +
          "a JSON array of matches ranked by relevance.",
        inputSchema: {
          query: z
            .string()
            .describe(
              "Search term, e.g. 'RFI', 'budget', 'punch list', 'submittal'"
            ),
        },
        annotations: { title: "Search Endpoints", ...READ_ONLY },
      },
      async (args) => {
        const text = await handleSearchEndpoints(args);
        return { content: [{ type: "text" as const, text }] };
      }
    );
  • Type definition for CatalogEntry, the data structure returned by the search.
    export interface CatalogEntry {
      operationId: string;
      method: string;
      path: string;
      summary: string;
      tag: string;
      category: string;
      module: string;
      version: string;
      pathParams: string[];
      requiredParams: string[];
      hasRequestBody: boolean;
      contentType: string | null;
    }
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=false, covering safety and idempotency. The description adds that it returns a JSON array ranked by relevance, providing behavioral detail beyond annotations without contradiction.

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 two sentences: the first defines the tool's action, the second gives usage guidance and output format. No unnecessary words, front-loaded with key information.

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 having no output schema, the description mentions the return format (JSON array ranked by relevance). Annotations cover safety traits. For a simple search tool with one parameter, the description is fully sufficient.

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 input schema already provides a description for the single 'query' parameter with examples. The description repeats similar examples ('RFI', 'budget', etc.) but does not add new semantic meaning. With 100% schema coverage, baseline is 3.

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 tool performs full-text search across Procore API endpoint metadata, specifying verb 'search' and resource 'endpoints'. It distinguishes itself from sibling tools (which are individual CRUD operations) by being a meta-search tool for locating endpoints.

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?

The description provides explicit usage guidance: 'Use to quickly locate the right endpoint when you know roughly what you're looking for' and gives example search terms. It implies when to use but does not explicitly state when not to use or mention alternative tools, though the sibling list makes the distinction clear.

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/TylerIlunga/procore-mcp-server'

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