Skip to main content
Glama
client.js990 B
import { Client } from '@notionhq/client'; export class NotionClient { client; constructor(apiKey, version) { this.client = new Client({ auth: apiKey, notionVersion: version || '2022-06-28' }); } async createPage(args) { return await this.client.pages.create(args); } async retrievePage(args) { const { page_id, filter_properties } = args; return await this.client.pages.retrieve({ page_id, ...(filter_properties && { filter_properties }) }); } async updatePage(args) { return await this.client.pages.update(args); } async retrievePageProperty(args) { const { page_id, property_id, page_size, start_cursor } = args; return await this.client.pages.properties.retrieve({ page_id, property_id, ...(page_size && { page_size }), ...(start_cursor && { start_cursor }) }); } }

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/michaelwaves/notion-mcp'

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