Skip to content
Merged
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.1] - 2025-05-01

### Added

- Added `limit` parameter to kibela_get_folder_notes to control the number of notes returned (default: 100)

## [1.1.0] - 2025-04-17

### Added
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ Get notes in a group that are not attached to any folder
Get notes in a folder
- Input:
- `folderId` (string): Folder ID
- `limit` (number, optional): Number of notes to fetch (default: 100)
- Returns: List of notes with author information, sorted by last update time

### kibela_get_users
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kiwamizamurai/mcp-kibela-server",
"version": "1.1.0",
"version": "1.1.1",
"description": "MCP server for Kibela API integration",
"license": "MIT",
"type": "module",
Expand All @@ -13,6 +13,14 @@
"files": [
"dist"
],
"keywords": [
"kibela",
"documentation",
"API",
"server",
"integration",
"mcp"
],
"repository": {
"type": "git",
"url": "https://github.com/kiwamizamurai/mcp-kibela-server"
Expand Down
13 changes: 9 additions & 4 deletions src/kibela.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ const GET_FOLDER_NOTES_TOOL: Tool = {
type: "object",
properties: {
folderId: { type: "string", description: "Folder ID" },
limit: {
type: "number",
description: "Number of notes to fetch (default 100)",
default: 100,
},
},
required: ["folderId"],
},
Expand Down Expand Up @@ -521,12 +526,12 @@ export const createServer = () => {
}

case "kibela_get_folder_notes": {
const { folderId } = args as { folderId: string };
const { folderId, limit = 100 } = args as { folderId: string; limit?: number };

const operation = `
query GetFolderNotes($folderId: ID!) {
query GetFolderNotes($folderId: ID!, $limit: Int!) {
folder(id: $folderId) {
notes(first: 10, active: true, orderBy: { field: CONTENT_UPDATED_AT, direction: DESC }) {
notes(first: $limit, active: true, orderBy: { field: CONTENT_UPDATED_AT, direction: DESC }) {
nodes {
id
title
Expand All @@ -542,7 +547,7 @@ export const createServer = () => {
}
`;

const response = await client.request<FolderNotesResponse>(operation, { folderId });
const response = await client.request<FolderNotesResponse>(operation, { folderId, limit });
return {
content: [
{
Expand Down