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[] 
      });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'List all' implies a read-only operation, it doesn't address important behavioral aspects like pagination, sorting, default ordering, rate limits, authentication requirements, or what 'stored' means in this context. The description is too minimal for a tool that presumably returns multiple items.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point without unnecessary words. It's appropriately sized for a listing tool, though it could potentially benefit from slightly more context given the lack of annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a listing tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what format the insights are returned in, whether there's pagination, what fields are included, or how 'business insights and analysis notes' differ from other data types. The agent lacks crucial information to effectively use this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with both parameters clearly documented in the input schema. The description doesn't add any parameter-specific information beyond what's already in the schema. This meets the baseline of 3 when the schema does the heavy lifting for parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List') and resource ('all stored business insights and analysis notes'), making the tool's purpose immediately understandable. However, it doesn't differentiate this listing tool from other list_* siblings like list_connections or list_tables, which would require specifying what makes insights distinct from those other resources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, when this listing is appropriate versus other list_* tools, or any exclusions. The agent must infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/omnisql-mcp'

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