Skip to main content
Glama
send-proposal.ts1.04 kB
import { type Tool } from 'fastmcp'; import { post } from '../../utils/requests.js'; import { sendProposalSchema } from '../../schemas/proposals.js'; import { throwApiInvalidResponseError } from '../../utils/errors.js'; import { z } from 'zod'; const parameters = z.object({ proposal_id: z.number(), send_message_id: z.number().optional(), send_method: z.enum(['offorte', 'self']).default('offorte').optional(), send_message: z.string().optional(), password_reset: z.boolean().optional(), }); export const sendProposalTool: Tool<typeof parameters._type, typeof parameters> = { name: 'send_proposal', description: 'Send a proposal to its assigned contacts', parameters, annotations: { title: 'Send Proposal', openWorldHint: true, }, async execute({ proposal_id, ...body }) { const result = await post(`/proposals/${proposal_id}/send/`, body); const parsed = sendProposalSchema.safeParse(result); if (!parsed.success) { throwApiInvalidResponseError(parsed.error); } return JSON.stringify(parsed.data); }, };

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