Skip to main content
Glama

create_correspondent

Add a new correspondent to your Paperless-NGX instance by specifying name, match criteria, and matching algorithm for automated document tagging.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
matchNo
matching_algorithmNo
nameYes

Implementation Reference

  • Registration of the MCP 'create_correspondent' tool, including inline input schema and handler function that invokes PaperlessAPI.createCorrespondent and enhances the response with matching algorithm details.
    server.tool( "create_correspondent", { name: z.string(), match: z.string().optional(), matching_algorithm: z .number() .int() .min(0) .max(6) .optional() .describe(MATCHING_ALGORITHM_DESCRIPTION), }, withErrorHandling(async (args, extra) => { if (!api) throw new Error("Please configure API connection first"); const response = await api.createCorrespondent(args); const enhancedCorrespondent = enhanceMatchingAlgorithm(response); return { content: [ { type: "text", text: JSON.stringify(enhancedCorrespondent) }, ], }; }) );
  • Zod input schema for the create_correspondent tool: requires name, optional match and matching_algorithm (0-6).
    { name: z.string(), match: z.string().optional(), matching_algorithm: z .number() .int() .min(0) .max(6) .optional() .describe(MATCHING_ALGORITHM_DESCRIPTION), },
  • Handler executes the tool: checks API, calls createCorrespondent on PaperlessAPI, enhances response, returns JSON as text content.
    withErrorHandling(async (args, extra) => { if (!api) throw new Error("Please configure API connection first"); const response = await api.createCorrespondent(args); const enhancedCorrespondent = enhanceMatchingAlgorithm(response); return { content: [ { type: "text", text: JSON.stringify(enhancedCorrespondent) }, ], }; }) );
  • PaperlessAPI helper method: POST request to /correspondents/ with correspondent data to create a new correspondent.
    async createCorrespondent( data: Partial<Correspondent> ): Promise<Correspondent> { return this.request<Correspondent>("/correspondents/", { method: "POST", body: JSON.stringify(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/baruchiro/paperless-mcp'

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