Skip to main content
Glama
TylerIlunga

Procore MCP Server

Get Full Endpoint Details

procore_get_endpoint_details
Read-onlyIdempotent

Retrieve the full parameter schema, request body, and response format for any Procore endpoint by providing its operation ID, ensuring accurate API calls.

Instructions

Fetch the full parameter schema, request body shape, and response format for a single Procore endpoint. Pass an operation_id from procore_discover_endpoints. Use this right before calling procore_api_call so you know exactly which path/query/body parameters to provide. Returns a JSON object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operation_idYesThe operationId returned by procore_discover_endpoints, e.g. 'RestV10ProjectsProjectIdRfisGet'

Implementation Reference

  • The handler function that executes the 'procore_get_endpoint_details' tool logic. It receives an operation_id, looks up details via getEndpointDetails() from the catalog service, and formats a human-readable response with parameters, request body, success/error responses.
    export async function handleGetEndpointDetails(args: {
      operation_id: string;
    }): Promise<string> {
      const detail = getEndpointDetails(args.operation_id);
    
      if (!detail) {
        return `Endpoint not found: ${args.operation_id}. Use procore_search_endpoints or procore_discover_endpoints to find valid operationIds.`;
      }
    
      const lines: string[] = [
        `## ${detail.method} ${detail.path}`,
        `**${detail.summary}**`,
        "",
      ];
    
      if (detail.description) {
        lines.push(detail.description, "");
      }
    
      // Parameters
      if (detail.parameters.length > 0) {
        lines.push("### Parameters");
        for (const p of detail.parameters) {
          const req = p.required ? " **(required)**" : "";
          const schemaStr = p.schema.type
            ? ` (${p.schema.type}${p.schema.format ? `, ${p.schema.format}` : ""})`
            : "";
          lines.push(
            `- \`${p.name}\` [${p.in}]${schemaStr}${req}: ${p.description}`
          );
          if (p.schema.enum) {
            lines.push(
              `  Values: ${(p.schema.enum as unknown[]).map((v) => `\`${v}\``).join(", ")}`
            );
          }
        }
        lines.push("");
      }
    
      // Request body
      if (detail.requestBody) {
        lines.push(`### Request Body (${detail.requestBody.contentType})`);
        if (detail.requestBody.required) {
          lines.push("**Required**");
        }
        lines.push("```json");
        lines.push(JSON.stringify(detail.requestBody.schema, null, 2));
        lines.push("```");
        lines.push("");
      }
    
      // Response schemas (just 200/201)
      const successCodes = Object.entries(detail.responses).filter(
        ([code]) => code === "200" || code === "201"
      );
      if (successCodes.length > 0) {
        lines.push("### Success Response");
        for (const [code, resp] of successCodes) {
          lines.push(`**${code}**: ${resp.description}`);
          if (resp.schema) {
            lines.push("```json");
            lines.push(
              JSON.stringify(resp.schema, null, 2).slice(0, 2000)
            );
            lines.push("```");
          }
        }
        lines.push("");
      }
    
      // Error codes
      const errorCodes = Object.entries(detail.responses)
        .filter(([code]) => code !== "200" && code !== "201")
        .map(([code, resp]) => `${code}: ${resp.description}`);
      if (errorCodes.length > 0) {
        lines.push("### Error Codes");
        lines.push(errorCodes.join(", "));
        lines.push("");
      }
    
      lines.push(
        "Use procore_api_call to execute this endpoint."
      );
    
      return lines.join("\n");
    }
  • The EndpointDetail type that defines the shape of data returned by getEndpointDetails(), including parameters, requestBody, and responses.
    export interface EndpointDetail {
      operationId: string;
      method: string;
      path: string;
      summary: string;
      description: string;
      tag: string;
      parameters: Array<{
        name: string;
        in: string;
        required: boolean;
        description: string;
        schema: Record<string, unknown>;
      }>;
      requestBody?: {
        contentType: string;
        required: boolean;
        schema: Record<string, unknown>;
      };
      responses: Record<
        string,
        { description: string; schema?: Record<string, unknown> }
      >;
    }
  • The tool registration for 'procore_get_endpoint_details' with input schema (operation_id string), annotations, and the handler wiring.
    // 3. Get Endpoint Details
    server.registerTool(
      "procore_get_endpoint_details",
      {
        title: "Get Full Endpoint Details",
        description:
          "Fetch the full parameter schema, request body shape, and response format for " +
          "a single Procore endpoint. Pass an `operation_id` from `procore_discover_endpoints`. " +
          "Use this right before calling `procore_api_call` so you know exactly which " +
          "path/query/body parameters to provide. Returns a JSON object.",
        inputSchema: {
          operation_id: z
            .string()
            .describe(
              "The operationId returned by procore_discover_endpoints, e.g. 'RestV10ProjectsProjectIdRfisGet'"
            ),
        },
        annotations: { title: "Get Endpoint Details", ...READ_ONLY },
      },
      async (args) => {
        const text = await handleGetEndpointDetails(args);
        return { content: [{ type: "text" as const, text }] };
      }
    );
  • The service-layer function getEndpointDetails() which delegates to loadEndpointDetail() in the repository.
    export function getEndpointDetails(
      operationId: string
    ): EndpointDetail | null {
      return loadEndpointDetail(operationId);
    }
    
    export function getEndpointByOperationId(
      operationId: string
    ): CatalogEntry | undefined {
      return findByOperationId(operationId);
    }
  • The repository function loadEndpointDetail() that reads the endpoint detail JSON file from disk (data/endpoint-details/{operationId}.json).
    export function loadEndpointDetail(
      operationId: string
    ): EndpointDetail | null {
      try {
        const raw = readFileSync(
          join(DATA_DIR, "endpoint-details", `${operationId}.json`),
          "utf8"
        );
        return JSON.parse(raw) as EndpointDetail;
      } catch {
        return null;
      }
    }
Behavior4/5

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

Annotations already declare read-only and idempotent hints. The description adds value by specifying the output format (JSON object) and the content (schema, body, response). No contradictions.

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?

Two sentences, front-loaded with purpose and immediate usage context. No extraneous words.

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?

Given the simplicity (1 parameter, no output schema), the description covers the usage workflow, parameter source, and return content. Annotations cover safety. Complete for the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, baseline 3. The description adds guidance on where to obtain the operation_id value (from procore_discover_endpoints) and provides an example, which is meaningful beyond the schema's description.

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 verb 'Fetch' and the resource 'full parameter schema, request body shape, and response format for a single Procore endpoint'. It distinguishes from sibling tools by positioning it between procore_discover_endpoints and procore_api_call.

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 explicitly says to use the operation_id from procore_discover_endpoints and to use this tool right before calling procore_api_call. It provides clear context but does not list explicit when-not-to-use scenarios.

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