Skip to main content
Glama
cotletdev

Contractor Foreman MCP Server

by cotletdev

Create opportunity

create_opportunity

Create a sales opportunity for an existing customer with stage, score, budget, and expected sale date so you can track deals in Contractor Foreman.

Instructions

Adds a sales opportunity for a customer with stage, score, budget and expected sale date.

Creates an opportunity in Contractor Foreman as the Opportunities Add drawer does, for a customer from the Directory. It is assigned to the signed-in user. Nobody is emailed. The opportunity number must be unique. Without one it gets OPP- and the UTC date and time (OPP-261021-1213). Returns the saved opportunity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
zipNo
cityNo
nameYes
scoreNo
stageNoreceived
stateNo
budgetNoExpected value in the account currency.
numberNoYour opportunity number. Left out: OPP- and the UTC date and time, as OPP-261021-1213.
address1No
customer_idYesA customer's contact_id (list_contacts type customer).
project_typeNocommercial
est_sales_dateNoExpected sale date, YYYY-MM-DD.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.3/5.0
Behavior5/5

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

The description adds substantial behavior beyond the annotations: it states that the record is assigned to the signed-in user, nobody is emailed, the opportunity number must be unique, a fallback number is generated from the UTC timestamp, and the saved opportunity is returned. These are exactly the side effects and postconditions an agent needs for a create operation, and none contradict the annotations.

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

Conciseness4/5

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

The description is front-loaded with the purpose, followed by operational details and return behavior. It is appropriately sized for a create tool, though the 'Creates an opportunity ... as the Opportunities Add drawer does' sentence partially repeats the opening.

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

Completeness4/5

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

Given there is no output schema, the description usefully states that it returns the saved opportunity and covers assignment, email behavior, and numbering. It is nearly complete for the operation, with the main gap being that several of the 12 input parameters are only documented in the schema.

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 only 33% across 12 parameters, so the description needs to compensate. It helps by naming key fields, tying customer_id to the Directory, and explaining number uniqueness/default generation, but it leaves address fields, project_type, name requirements, and stage/score semantics largely to 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 opens with a specific verb and resource: 'Adds a sales opportunity' for a customer, and names the core fields stage, score, budget and expected sale date. That is enough for an agent to distinguish this create tool from get_opportunity and list_opportunities without opening the schema.

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?

It gives clear usage context: the customer must come from the Directory, the opportunity is assigned to the signed-in user, and it mirrors the Opportunities Add drawer. It does not explicitly say when to use this instead of create_lead or another create sibling, but the context is strong enough that an agent should not confuse the use case.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools