systemprompt-mcp-notion
Version:
A specialized Model Context Protocol (MCP) server that integrates Notion into your AI workflows. This server enables seamless access to Notion through MCP, allowing AI agents to interact with pages, databases, and comments.
48 lines (47 loc) • 1.06 kB
JavaScript
/**
* Creates a text response for tool calls
*/
export function createTextResponse(text) {
return {
content: [
{
type: "text",
text,
},
],
};
}
/**
* Creates a pages response for tool calls
*/
export function createPagesResponse(pages) {
return {
content: [
{
type: "resource",
resource: {
uri: "notion://pages",
text: JSON.stringify(pages, null, 2),
mimeType: "application/json",
},
},
],
};
}
/**
* Creates a databases response for tool calls
*/
export function createDatabasesResponse(databases) {
return {
content: [
{
type: "resource",
resource: {
uri: "notion://databases",
text: JSON.stringify(databases, null, 2),
mimeType: "application/json",
},
},
],
};
}