@gluneau/hive-mcp-server
Version:
An MCP server that enables AI assistants to interact with the Hive blockchain
106 lines • 4.19 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createCommentSchema = exports.createPostSchema = exports.getPostsByUserSchema = exports.getPostsByTagSchema = exports.getPostContentSchema = void 0;
// Content and posting schemas
const zod_1 = require("zod");
const common_1 = require("./common");
// Schema for get_post_content tool
exports.getPostContentSchema = zod_1.z.object({
author: zod_1.z.string().describe('Author of the post'),
permlink: zod_1.z.string().describe('Permlink of the post'),
});
// Schema for get_posts_by_tag tool
exports.getPostsByTagSchema = zod_1.z.object({
category: common_1.tagQueryCategories.describe('Sorting category for posts (e.g. trending, hot, created)'),
tag: zod_1.z.string().describe('The tag to filter posts by'),
limit: zod_1.z
.number()
.min(1)
.max(20)
.default(10)
.describe('Number of posts to return (1-20)'),
});
// Schema for get_posts_by_user tool
exports.getPostsByUserSchema = zod_1.z.object({
category: common_1.userQueryCategories.describe('Type of user posts to fetch (blog = posts by user, feed = posts from users they follow)'),
username: zod_1.z.string().describe('Hive username to fetch posts for'),
limit: zod_1.z
.number()
.min(1)
.max(20)
.default(10)
.describe('Number of posts to return (1-20)'),
});
// Schema for create_post tool
exports.createPostSchema = zod_1.z.object({
title: zod_1.z.string().min(1).max(256).describe('Title of the blog post'),
body: zod_1.z
.string()
.min(1)
.describe('Content of the blog post, can include Markdown formatting'),
tags: common_1.tagsSchema.describe('Tags for the post. Can be provided as comma-separated string \'blog,life,writing\' or array'),
beneficiaries: common_1.beneficiariesSchema.describe('Optional list of beneficiaries to receive a portion of the rewards'),
permalink: zod_1.z
.string()
.optional()
.describe('Optional custom permalink. If not provided, one will be generated from the title'),
max_accepted_payout: zod_1.z
.string()
.optional()
.describe('Optional maximum accepted payout (e.g. \'1000.000 HBD\')'),
percent_hbd: zod_1.z
.number()
.min(0)
.max(10000)
.optional()
.describe('Optional percent of HBD in rewards (0-10000, where 10000 = 100%)'),
allow_votes: zod_1.z
.boolean()
.optional()
.default(true)
.describe('Whether to allow votes on the post'),
allow_curation_rewards: zod_1.z
.boolean()
.optional()
.default(true)
.describe('Whether to allow curation rewards'),
});
// Schema for create_comment tool
exports.createCommentSchema = zod_1.z.object({
parent_author: zod_1.z
.string()
.describe('Username of the post author or comment you\'re replying to'),
parent_permlink: zod_1.z
.string()
.describe('Permlink of the post or comment you\'re replying to'),
body: zod_1.z
.string()
.min(1)
.describe('Content of the comment, can include Markdown formatting'),
permalink: zod_1.z
.string()
.optional()
.describe('Optional custom permalink for your comment. If not provided, one will be generated'),
beneficiaries: common_1.beneficiariesSchema.describe('Optional list of beneficiaries to receive a portion of the rewards'),
max_accepted_payout: zod_1.z
.string()
.optional()
.describe('Optional maximum accepted payout (e.g. \'1000.000 HBD\')'),
percent_hbd: zod_1.z
.number()
.min(0)
.max(10000)
.optional()
.describe('Optional percent of HBD in rewards (0-10000, where 10000 = 100%)'),
allow_votes: zod_1.z
.boolean()
.optional()
.default(true)
.describe('Whether to allow votes on the comment'),
allow_curation_rewards: zod_1.z
.boolean()
.optional()
.default(true)
.describe('Whether to allow curation rewards'),
});
//# sourceMappingURL=content.js.map