Skip to main content
Glama
leejersey

Hexo Blog MCP Server

by leejersey

delete_post

Remove a specific blog post from a Hexo blog by providing its filename. This action permanently deletes the post and cannot be reversed.

Instructions

删除指定的博客文章(不可撤销)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYes要删除的文章文件名

Implementation Reference

  • The actual implementation of the delete operation, which resolves the file path and unlinks it from the filesystem.
    export async function deletePost(filename: string): Promise<void> {
        const fullPath = postPath(filename);
        await fs.unlink(fullPath);
    }
  • The MCP tool registration for "delete_post", which wraps the deletePost function and handles MCP tool communication.
    // 删除文章
    server.tool(
        "delete_post",
        "删除指定的博客文章(不可撤销)",
        { filename: z.string().describe("要删除的文章文件名") },
        async ({ filename }) => {
            try {
                await deletePost(filename);
                return {
                    content: [
                        { type: "text" as const, text: `🗑️ 文章 "${filename}" 已删除。建议执行 backup_source 备份更改。` },
                    ],
                };
            } catch (e: any) {
                return { content: [{ type: "text" as const, text: `错误: ${e.message}` }], isError: true };
            }
        }
    );
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly states the operation is irreversible ('不可撤销'), which is crucial behavioral information for a destructive operation. However, it doesn't mention permissions required, error conditions, or what happens to associated data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise - a single sentence that communicates both the action and a critical behavioral constraint. Every word earns its place with zero waste or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive tool with no annotations and no output schema, the description provides the essential warning about irreversibility but lacks information about permissions, error handling, or confirmation requirements. Given the high-risk nature of deletion operations, more context would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% with the single parameter 'filename' already documented in the schema. The description doesn't add any additional parameter semantics beyond what the schema provides, so it meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('删除' - delete) and resource ('博客文章' - blog post), distinguishing it from sibling tools like create_post, update_post, and read_post. It precisely communicates the tool's function without ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus alternatives like update_post or when deletion is appropriate. The description mentions the action is irreversible, but doesn't specify prerequisites, conditions, or alternatives for handling blog posts.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/leejersey/hexo-mcp-server'

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