plurk_reply
Post replies to Plurk threads using the plurk-mcp server. Reply to owned threads or explicit mentions with provided credentials and content.
Instructions
Reply to an eligible Plurk thread for the supplied credentials when it is an owned thread or an explicit mention.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| credentials | Yes | ||
| plurkId | Yes | ||
| content | Yes | ||
| qualifier | No |
Implementation Reference
- src/services/plurkApplication.ts:208-275 (handler)The 'createReply' method in PlurkApplication handles the logic for replying to a Plurk thread, including validation, eligibility checks, policy enforcement, the actual API call, and audit logging.
public async createReply( adapterSource: AdapterSource, credentials: PlurkCredentialsInput, input: { readonly plurkId: number; readonly content: string; readonly qualifier?: string }, ): Promise<WriteResult> { if (!Number.isInteger(input.plurkId) || input.plurkId <= 0) { throw new ServiceError("validation", "plurkId must be a positive integer", { metadata: { plurkId: input.plurkId }, }); } const trimmedContent = input.content.trim(); if (trimmedContent.length === 0) { throw new ServiceError("validation", "content must not be empty"); } const actionId = randomUUID(); const targetIds = { plurkId: input.plurkId, threadId: input.plurkId }; let account: AuthenticatedAccount | undefined; try { const context = await this.resolveAccountContext(credentials); account = context.account; const thread = await context.client.getThreadContext( input.plurkId, context.profile.nickName ?? "", ); this.assertReplyEligible(thread, context.account); await this.policyService.assertCanReply(context.account, thread.plurk.plurkId); const result = await context.client.createReply({ plurkId: input.plurkId, content: trimmedContent, qualifier: input.qualifier, }); await this.policyService.recordSuccessfulReply(context.account, thread.plurk.plurkId); await this.auditLogStore.append( buildAuditEvent({ timestamp: new Date().toISOString(), adapterSource, eventType: "write.success", actionId, actionType: "respond-to-plurk", account, requestSummary: { qualifier: input.qualifier ?? ":", contentLength: trimmedContent.length }, targetIds: { plurkId: result.plurkId || input.plurkId, responseId: result.responseId, threadId: input.plurkId, }, result: summarizeWriteResult(result), }), ); return result; } catch (error) { await this.handleWriteFailure(error, { adapterSource, actionId, actionType: "respond-to-plurk", account, requestSummary: { qualifier: input.qualifier ?? ":", contentLength: trimmedContent.length }, targetIds, }); throw error; } } - src/transports/mcp/toolCatalog.ts:80-91 (registration)The 'plurk_reply' tool is defined and registered in the tool catalog, mapping to the 'application.createReply' method.
name: "plurk_reply", description: "Reply to an eligible Plurk thread for the supplied credentials when it is an owned thread or an explicit mention.", inputSchema: z.object({ credentials: credentialsSchema, plurkId: z.number().int().positive(), content: z.string().min(1), qualifier: z.string().min(1).max(12).optional(), }), execute: async ({ credentials, plurkId, content, qualifier }) => application.createReply("mcp", credentials, { plurkId, content, qualifier }), },