Skip to main content
Glama

note_list

Retrieve and filter project notes by type, tags, or related entities to track decisions, meetings, blockers, and progress within structured project management.

Instructions

List notes with optional filters. Returns notes sorted by most recent first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
note_typeNo
related_entity_typeNo
related_entity_idNo
tagNoFilter by a single tag
limitNo

Implementation Reference

  • Implementation of the 'note_list' tool handler.
    function handleNoteList(args: Record<string, unknown>) {
      const db = getDb();
      const noteType = args.note_type as string | undefined;
      const relatedEntityType = args.related_entity_type as string | undefined;
      const relatedEntityId = args.related_entity_id as number | undefined;
      const tag = args.tag as string | undefined;
      const limit = (args.limit as number) ?? 30;
    
      const whereClauses: string[] = [];
      const params: unknown[] = [];
    
      if (noteType) {
        whereClauses.push('note_type = ?');
        params.push(noteType);
      }
      if (relatedEntityType) {
        whereClauses.push('related_entity_type = ?');
        params.push(relatedEntityType);
      }
      if (relatedEntityId !== undefined) {
        whereClauses.push('related_entity_id = ?');
        params.push(relatedEntityId);
      }
      if (tag) {
        addTagFilter(whereClauses, params, tag, 'notes');
      }
    
      const whereStr = whereClauses.length > 0 ? `WHERE ${whereClauses.join(' AND ')}` : '';
    
      const sql = `SELECT * FROM notes ${whereStr} ORDER BY created_at DESC LIMIT ?`;
      params.push(limit);
    
      return db.prepare(sql).all(...params);
    }
  • Definition and schema for the 'note_list' tool.
    {
      name: 'note_list',
      description: 'List notes with optional filters. Returns notes sorted by most recent first.',
      annotations: { title: 'List Notes', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
      inputSchema: {
        type: 'object',
        properties: {
          note_type: {
            type: 'string',
            enum: ['general', 'decision', 'context', 'meeting', 'technical', 'blocker', 'progress', 'release'],
          },
          related_entity_type: { type: 'string', enum: ['project', 'epic', 'task'] },
          related_entity_id: { type: 'integer' },
          tag: { type: 'string', description: 'Filter by a single tag' },
          limit: { type: 'integer', default: 30 },
        },
      },
    },
  • Registration of 'note_list' in the handlers map.
    note_list: handleNoteList,

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/spranab/saga-mcp'

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