plurk_post
Create new Plurk posts with secure authentication while automatically enforcing daily posting limits to maintain controlled social media activity.
Instructions
Create a new Plurk post for the supplied credentials while enforcing the server-side daily post quota.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| credentials | Yes | ||
| content | Yes | ||
| qualifier | No |
Implementation Reference
- src/services/plurkApplication.ts:158-206 (handler)The createPlurk method in PlurkApplication implements the core logic for the plurk_post tool, including input sanitization, policy enforcement, API interaction, and auditing.
public async createPlurk( adapterSource: AdapterSource, credentials: PlurkCredentialsInput, input: { readonly content: string; readonly qualifier?: string }, ): Promise<WriteResult> { const trimmedContent = input.content.trim(); if (trimmedContent.length === 0) { throw new ServiceError("validation", "content must not be empty"); } const actionId = randomUUID(); let account: AuthenticatedAccount | undefined; try { const context = await this.resolveAccountContext(credentials); account = context.account; await this.policyService.assertCanCreatePost(context.account); const result = await context.client.createPlurk({ content: trimmedContent, qualifier: input.qualifier, }); await this.policyService.recordSuccessfulPost(context.account); await this.auditLogStore.append( buildAuditEvent({ timestamp: new Date().toISOString(), adapterSource, eventType: "write.success", actionId, actionType: "create-plurk", account, requestSummary: { qualifier: input.qualifier ?? ":", contentLength: trimmedContent.length }, targetIds: { plurkId: result.plurkId, threadId: result.plurkId }, result: summarizeWriteResult(result), }), ); return result; } catch (error) { await this.handleWriteFailure(error, { adapterSource, actionId, actionType: "create-plurk", account, requestSummary: { qualifier: input.qualifier ?? ":", contentLength: trimmedContent.length }, }); throw error; } } - src/transports/mcp/toolCatalog.ts:68-78 (registration)The plurk_post tool is registered in the tool catalog with its description, schema, and execution call to application.createPlurk.
name: "plurk_post", description: "Create a new Plurk post for the supplied credentials while enforcing the server-side daily post quota.", inputSchema: z.object({ credentials: credentialsSchema, content: z.string().min(1), qualifier: z.string().min(1).max(12).optional(), }), execute: async ({ credentials, content, qualifier }) => application.createPlurk("mcp", credentials, { content, qualifier }), },