Skip to main content
Glama

create_proposal

Generate new business proposals by selecting templates, contacts, and custom fields for professional client presentations.

Instructions

Create a new proposal

Input Schema

NameRequiredDescriptionDefault
account_user_idNo
contact_idYes
contact_peopleYes
design_template_idYes
nameYes
proposal_template_idYes
text_template_idYes
custom_fieldsNo

Input Schema (JSON Schema)

{ "properties": { "account_user_id": { "type": "number" }, "contact_id": { "type": "number" }, "contact_people": { "items": { "type": "number" }, "type": "array" }, "custom_fields": { "items": { "additionalProperties": false, "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, "required": [ "name", "value" ], "type": "object" }, "type": "array" }, "design_template_id": { "type": "number" }, "name": { "type": "string" }, "proposal_template_id": { "type": "number" }, "text_template_id": { "type": "number" } }, "required": [ "contact_id", "contact_people", "design_template_id", "name", "proposal_template_id", "text_template_id" ], "type": "object" }

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); }, };
  • 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(), });
  • Import statement for the createProposalTool from its implementation file.
    import { createProposalTool } from './proposals/create-proposal.js';
  • The createProposalTool is included in the 'tools' array, which is subsequently registered with the MCP server via registerTools function.
    createProposalTool,

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/offorte/offorte-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server