Skip to main content
Glama
TylerIlunga

Procore MCP Server

Set Runtime Configuration Value

procore_set_config
Idempotent

Set runtime configuration keys (company_id or project_id) to switch default company/project context without restarting the server. Changes persist until server restart.

Instructions

Set a runtime configuration key (e.g. company_id or project_id) for the current session. The change persists until the server restarts. Use this to switch the default company/project context without restarting the MCP server. Returns a confirmation message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesConfig key — currently 'company_id' or 'project_id'
valueYesNew value (string; numbers are coerced server-side)

Implementation Reference

  • Registration of the 'procore_set_config' tool with the MCP server, including its title, description, input schema (key and value), and the async handler that calls handleSetConfig.
    // 7. Set Config
    server.registerTool(
      "procore_set_config",
      {
        title: "Set Runtime Configuration Value",
        description:
          "Set a runtime configuration key (e.g. company_id or project_id) for the " +
          "current session. The change persists until the server restarts. Use this " +
          "to switch the default company/project context without restarting the MCP " +
          "server. Returns a confirmation message.",
        inputSchema: {
          key: z
            .string()
            .describe("Config key — currently 'company_id' or 'project_id'"),
          value: z.string().describe("New value (string; numbers are coerced server-side)"),
        },
        annotations: {
          title: "Set Config",
          readOnlyHint: false,
          destructiveHint: false,
          idempotentHint: true,
          openWorldHint: false,
        },
      },
      async (args) => {
        const text = await handleSetConfig(args);
        return { content: [{ type: "text" as const, text }] };
      }
    );
  • The handleSetConfig function that validates the key (allowed: company_id, project_id), coerces numeric values via parseInt, calls setRuntimeConfig, and returns a confirmation message with the current config state.
    import { setRuntimeConfig, getRuntimeConfig } from "../../api/client.js";
    
    export async function handleSetConfig(args: {
      key: string;
      value: string;
    }): Promise<string> {
      const allowedKeys = ["company_id", "project_id"];
    
      if (!allowedKeys.includes(args.key)) {
        return `Invalid config key: "${args.key}". Allowed keys: ${allowedKeys.join(", ")}`;
      }
    
      const numericKeys = ["company_id", "project_id"];
      const value = numericKeys.includes(args.key)
        ? parseInt(args.value, 10)
        : args.value;
    
      if (numericKeys.includes(args.key) && isNaN(value as number)) {
        return `"${args.key}" must be a number. Got: "${args.value}"`;
      }
    
      setRuntimeConfig(args.key, value);
    
      const config = getRuntimeConfig();
      return `Config updated: ${args.key} = ${value}\n\nCurrent config: ${JSON.stringify(config, null, 2)}`;
    }
  • Runtime config store (in-memory) with setRuntimeConfig and getRuntimeConfig helper functions that read/write key-value pairs to the runtimeConfig object.
    // Runtime config store (in-memory, set via procore_set_config tool)
    let runtimeConfig: Record<string, string | number> = {};
    
    export function getRuntimeConfig(): Record<string, string | number> {
      return { ...runtimeConfig };
    }
    
    export function setRuntimeConfig(
      key: string,
      value: string | number
    ): void {
      runtimeConfig[key] = value;
    }
  • Input schema for the tool defining 'key' (string, described as 'company_id' or 'project_id') and 'value' (string, coerced server-side) using Zod validation.
    inputSchema: {
      key: z
        .string()
        .describe("Config key — currently 'company_id' or 'project_id'"),
      value: z.string().describe("New value (string; numbers are coerced server-side)"),
    },
Behavior5/5

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

Annotations already indicate idempotentHint=true and non-destructive behavior. The description adds valuable context: changes persist until server restart and returns a confirmation message, enhancing transparency beyond annotations.

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 three sentences with no wasted words. It front-loads the action ('Set a runtime configuration key') and efficiently conveys purpose, persistence, usage, and return value.

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?

For a simple two-parameter tool with full schema descriptions and relevant annotations, the description provides complete context: purpose, scope of effect, usage guidance, and return type. Nothing essential is missing.

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

Parameters5/5

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

Input schema provides 100% coverage with descriptions for both parameters. The description adds value by giving concrete examples (company_id, project_id) for the key and noting that numbers are coerced server-side for the value, going beyond the schema.

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 sets a runtime configuration key for the session, with examples like company_id and project_id. It distinguishes itself from its read counterpart (procore_get_config) by focusing on writing config values.

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 this tool to switch default company/project context without restarting the MCP server, providing clear usage context. It does not explicitly list when not to use, but the guidance is sufficient given the tool's simplicity.

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