Skip to main content
Glama
TylerIlunga

Procore MCP Server

Get Or Create Context With Hierarchy

get_or_create_context_with_hierarchy

Retrieve an existing context hierarchy or create a new one with default layers for Document Markup records using context type and ID.

Instructions

Get existing context hierarchy based on context_type and context_type_id combination. If context doesn't exist, create a new context with default layers and return the hierarchy. Use this to perform the get or action on Document Markup records. Creates a new Document Markup records and returns the created object on success (HTTP 201). Required parameters: company_id, project_id, name, context_type, context_type_id. Procore API: Project Management > Document Markup. Endpoint: POST /rest/v1.0/companies/{company_id}/projects/{project_id}/contexts/get_or_create

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
company_idYesURL path parameter — unique identifier for the Procore company
project_idYesURL path parameter — unique identifier for the Procore project
nameYesJSON request body field — the name for this Document Markup operation
context_typeYesJSON request body field — the context type for this Document Markup operation
context_type_idYesJSON request body field — unique identifier of the context type
sub_context_typeNoJSON request body field — the sub context type for this Document Markup operation
sub_context_type_idNoJSON request body field — unique identifier of the sub context type
settingsNoJSON request body field — the settings for this Document Markup operation
Behavior3/5

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

Annotations indicate readOnlyHint=false, so the description correctly implies mutation. It mentions creating with 'default layers', adding context beyond the schema. However, it does not disclose potential side effects, what 'default layers' entails, or the exact behavior when the context already exists. With annotations present, the description adds modest value.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is relatively concise at 3-4 sentences. However, it contains redundancy (e.g., 'Use this to perform the get or action') and an unrelated reference to 'Document Markup records' that clutters the message. It could be streamlined to focus solely on the context hierarchy logic.

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?

The tool has 8 parameters (including nested objects), no output schema, and moderate complexity. The description fails to explain what 'default layers' are, what the 'settings' object expects, or the structure of the returned hierarchy. It also does not clarify the HTTP 201 response beyond 'returns the created object'. Given these gaps, the description is insufficient for complete understanding.

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 description coverage is 100%, so the baseline is 3. The description lists required parameters but does not add meaning beyond what is already in the schema fields. For example, 'name' and 'settings' are not elaborated. No extra value is provided over the schema.

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 tool's verb-resource pair: 'Get existing context hierarchy' or 'create a new context with default layers'. It specifies the key combination of context_type and context_type_id. However, the inclusion of 'Document Markup records' and 'Creates a new Document Markup records' introduces confusion about the actual resource being manipulated, which detracts from clarity.

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 does not provide guidance on when to use this tool versus alternatives. Sibling tools like 'create_a_new_context' and 'get_context_by_id' exist, but no comparison or exclusions are mentioned. The phrase 'Use this to perform the get or action' is vague and does not differentiate from other tools.

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