actual-mcp
Version:
Actual Budget MCP server exposing API functionality
44 lines • 1.61 kB
TypeScript
import { CallToolResult, TextContent, ImageContent, AudioContent } from '@modelcontextprotocol/sdk/types.js';
/**
* Standard MCP content item types (union of all supported content types)
*/
export type ContentItem = TextContent | ImageContent | AudioContent;
/**
* Text content item (most common type)
*/
export type TextContentItem = TextContent;
/**
* Standard MCP response structure (compatible with CallToolResult)
*/
export type Response = CallToolResult;
/**
* Create a successful plain text response
* @param text - The text message
* @returns A success response object with text content
*/
export declare function success(text: string): CallToolResult;
/**
* Create a success response with structured content
* @param content - Array of content items
* @returns A success response object with provided content
*/
export declare function successWithContent(content: ContentItem): CallToolResult;
/**
* Create a success response with JSON data
* @param data - Any data object that can be JSON-stringified
* @returns A success response with JSON data wrapped as a resource
*/
export declare function successWithJson<T>(data: T): CallToolResult;
/**
* Create an error response
* @param message - The error message
* @returns An error response object
*/
export declare function error(message: string): CallToolResult;
/**
* Create an error response from an Error object or any thrown value
* @param err - The error object or value
* @returns An error response object
*/
export declare function errorFromCatch(err: unknown): CallToolResult;
//# sourceMappingURL=response.d.ts.map