Skip to main content
Glama
create-contact.ts784 B
import { type Tool } from 'fastmcp'; import { post } from '../../utils/requests.js'; import { contactCreateSchema } from '../../schemas/contacts.js'; import { throwApiInvalidResponseError } from '../../utils/errors.js'; const parameters = contactCreateSchema; export const createContactTool: Tool<typeof parameters._type, typeof parameters> = { name: 'create_contact', description: 'Create a new contact (organisation or person/individual)', parameters, annotations: { title: 'Create Contact', openWorldHint: true, }, async execute(params) { const parsed = contactCreateSchema.safeParse(params); if (!parsed.success) { throwApiInvalidResponseError(parsed.error); } const result = await post('/contacts/', parsed.data); return JSON.stringify(result); }, };

Implementation Reference

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