get_qiita_markdown_rules
Retrieve Qiita markdown syntax rules and cheat sheet for creating, updating, and formatting articles using the Qiita MCP Server.
Instructions
get Qiita markdown syntax rules, cheat sheet
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/qiitaTools.ts:119-127 (handler)The handler function that implements the core logic of the 'get_qiita_markdown_rules' tool. It calls the Qiita API service to fetch markdown rules and returns a formatted success or error response.
const getQiitaMarkdownRules = async (): Promise<any> => { try { const markdownRules = await apiService.getMarkdownRules(); return createSuccessResponse(markdownRules); } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return createErrorResponse(`Error fetching Qiita markdown rules: ${errorMessage}`); } }; - src/tools/qiitaTools.ts:155-160 (registration)The registration of the tool within the getToolDefinitions array, defining its name, description, empty parameters schema, and linking to the handler function.
{ name: "get_qiita_markdown_rules", description: "get Qiita markdown syntax rules, cheat sheet", parameters: {} as z.ZodRawShape, handler: () => getQiitaMarkdownRules() } - src/tools/qiitaTools.ts:6-15 (helper)Helper function to format successful responses, used by the tool handler.
const createSuccessResponse = (content: string): any => { return { content: [ { type: "text", text: content } ] }; }; - src/tools/qiitaTools.ts:17-27 (helper)Helper function to format error responses, used by the tool handler.
const createErrorResponse = (errorMessage: string): any => { return { content: [ { type: "text", text: `Error: ${errorMessage}` } ], isError: true }; };