create_proposal
Generate new business proposals by selecting templates, contacts, and custom fields for professional client presentations.
Instructions
Create a new proposal
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account_user_id | No | ||
| contact_id | Yes | ||
| contact_people | Yes | ||
| design_template_id | Yes | ||
| name | Yes | ||
| proposal_template_id | Yes | ||
| text_template_id | Yes | ||
| custom_fields | No |
Implementation Reference
- Defines the 'create_proposal' tool object, including its input parameters schema, annotations, and the core execute handler function that sends a POST request to the '/proposals/' endpoint, parses the response using createProposalSchema, and returns the stringified data.export const createProposalTool: Tool<typeof parameters._type, typeof parameters> = { name: 'create_proposal', description: 'Create a new proposal', parameters, annotations: { title: 'Create Proposal', openWorldHint: true, }, async execute(params) { const result = await post('/proposals/', params); const parsed = createProposalSchema.safeParse(result); if (!parsed.success) { throwApiInvalidResponseError(parsed.error); } return JSON.stringify(parsed.data); }, };
- src/schemas/proposals.ts:72-75 (schema)Zod schema used for safe-parsing the API response from creating a proposal, validating the presence of 'id' and 'version_id' fields.export const createProposalSchema = z.object({ id: z.number(), version_id: z.number(), });
- src/tools/register.ts:16-16 (registration)Import statement for the createProposalTool from its implementation file.import { createProposalTool } from './proposals/create-proposal.js';
- src/tools/register.ts:33-33 (registration)The createProposalTool is included in the 'tools' array, which is subsequently registered with the MCP server via registerTools function.createProposalTool,