Skip to main content
Glama

post_qiita_article

Publish articles on Qiita with customizable options for title, content, tags, privacy, and more. Streamline content sharing using a standardized MCP tool for efficient publishing.

Instructions

create a new article on Qiita

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesMarkdown formatted content
organization_url_nameNoThe url_name of the organization for the article
privateNoWhether the article is private
slideNoWhether to enable slide mode
tagsYesList of tags for the article
titleYesArticle title
tweetNoWhether to post to Twitter

Implementation Reference

  • The main handler function for the 'post_qiita_article' tool. It uses the QiitaApiService to create a new article and returns a success or error response.
    const postQiitaArticle = async (params: PostArticleParams): Promise<any> => { try { const newItem = await apiService.createItem(params); return createSuccessResponse( `記事が正常に投稿されました。\nタイトル: ${newItem.title}\nURL: ${newItem.url}\n\n` + JSON.stringify(newItem, null, 2) ); } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return createErrorResponse(`Error posting Qiita article: ${errorMessage}`); } };
  • Zod schema defining the input parameters for the post_qiita_article tool, including title, body, tags, etc., and the inferred TypeScript type.
    const postArticleSchema = z.object({ title: z.string().describe("Article title"), body: z.string().describe("Markdown formatted content"), tags: z.array(z.object({ name: z.string().describe("Tag name"), versions: z.array(z.string()).optional().describe("Versions (optional)") })).describe("List of tags for the article"), private: z.boolean().optional().default(true).describe("Whether the article is private"), tweet: z.boolean().optional().describe("Whether to post to Twitter"), organization_url_name: z.string().optional().describe("The url_name of the organization for the article"), slide: z.boolean().optional().describe("Whether to enable slide mode") }); type PostArticleParams = z.infer<typeof postArticleSchema>;
  • The registration of the 'post_qiita_article' tool within the getToolDefinitions array, specifying name, description, parameters schema, and handler.
    { name: "post_qiita_article", description: "create a new article on Qiita", parameters: postArticleSchema.shape, handler: (params: PostArticleParams) => postQiitaArticle(params) },

Other Tools

Related Tools

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/2bo/qiita-mcp-server'

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