Skip to main content
Glama
srthkdev

DBeaver MCP Server

by srthkdev

list_insights

Retrieve stored business insights and analysis notes from databases, with optional filtering by connection ID or tags.

Instructions

List all stored business insights and analysis notes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionNoFilter insights by connection ID (optional)
tagsNoFilter insights by tags (optional)

Implementation Reference

  • The handleListInsights function implements the core logic of the list_insights tool. It filters the stored insights based on optional connection ID and tags parameters and returns the results as JSON-formatted text content.
    private async handleListInsights(args: { connection?: string; tags?: string[] }) { let filteredInsights = [...this.insights]; if (args.connection) { filteredInsights = filteredInsights.filter(insight => insight.connection === args.connection ); } if (args.tags && args.tags.length > 0) { filteredInsights = filteredInsights.filter(insight => insight.tags && args.tags!.some(tag => insight.tags!.includes(tag)) ); } return { content: [{ type: 'text' as const, text: JSON.stringify(filteredInsights, null, 2), }], }; }
  • Defines the input JSON schema for the list_insights tool, specifying optional 'connection' string and 'tags' array parameters for filtering.
    inputSchema: { type: 'object', properties: { connection: { type: 'string', description: 'Filter insights by connection ID (optional)', }, tags: { type: 'array', items: { type: 'string' }, description: 'Filter insights by tags (optional)', }, }, },
  • src/index.ts:451-468 (registration)
    Registers the list_insights tool in the ListToolsRequestSchema response by defining its name, description, and input schema in the tools array.
    { name: 'list_insights', description: 'List all stored business insights and analysis notes', inputSchema: { type: 'object', properties: { connection: { type: 'string', description: 'Filter insights by connection ID (optional)', }, tags: { type: 'array', items: { type: 'string' }, description: 'Filter insights by tags (optional)', }, }, }, },
  • src/index.ts:555-559 (registration)
    Maps the 'list_insights' tool name to its handler function in the CallToolRequestSchema switch statement.
    case 'list_insights': return await this.handleListInsights(args as { connection?: string; tags?: string[] });

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/srthkdev/dbeaver-mcp-server'

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