kibela_get_groups
Retrieve a list of groups you can access in Kibela, enabling group-specific queries and operations.
Instructions
Get list of accessible groups
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/kibela.ts:77-84 (schema)Tool schema/definition for kibela_get_groups with no required input parameters.
const GET_GROUPS_TOOL: Tool = { name: "kibela_get_groups", description: "Get list of accessible groups", inputSchema: { type: "object", properties: {}, }, }; - src/kibela.ts:206-221 (registration)Registration of GET_GROUPS_TOOL in the list of available tools.
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ SEARCH_NOTES_TOOL, GET_MY_NOTES_TOOL, GET_NOTE_CONTENT_TOOL, GET_GROUPS_TOOL, GET_GROUP_FOLDERS_TOOL, GET_GROUP_NOTES_TOOL, GET_FOLDER_NOTES_TOOL, GET_USERS_TOOL, LIKE_NOTE_TOOL, UNLIKE_NOTE_TOOL, GET_RECENTLY_VIEWED_NOTES_TOOL, GET_NOTE_FROM_PATH_TOOL, ], })); - src/kibela.ts:414-440 (handler)Handler implementation: executes a GraphQL query to fetch up to 10 readable groups and returns them as JSON text.
case "kibela_get_groups": { const operation = ` query GetGroups { groups(first: 10, ability: READABLE) { nodes { id name description isPrivate canBeManaged canBeJoinedBySelf isJoined } } } `; const response = await client.request<GroupResponse>(operation); return { content: [ { type: "text", text: JSON.stringify(response.groups.nodes, null, 2), }, ], }; } - src/types.ts:97-101 (helper)Type definition for the GraphQL response containing groups.
export interface GroupResponse { groups: { nodes: KibelaGroup[]; }; } - src/types.ts:7-15 (helper)Type definition for a Kibela group object returned by the API.
export interface KibelaGroup { id: string; name: string; description?: string; isPrivate?: boolean; canBeManaged?: boolean; canBeJoinedBySelf?: boolean; isJoined?: boolean; }