Skip to main content
Glama
chenkumi

easy-mysql-mcp

by chenkumi

get_current_privileges

Check the permissions and grants of the current database user to debug access issues.

Instructions

Check the permissions and grants of the current database user. Useful for debugging access issues.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for get_current_privileges that executes the tool logic: queries CURRENT_USER() and SHOW GRANTS from the database.
      async () => {
        const user = await db.query('SELECT CURRENT_USER() as user');
        const grants = await db.query('SHOW GRANTS');
        return {
          content: [{ 
            type: 'text', 
            text: JSON.stringify({ currentUser: user, grants }, null, 2) 
          }],
        };
      }
    );
  • src/index.ts:150-166 (registration)
    Registration of the 'get_current_privileges' tool on the MCP server with its name, description, input schema, and handler function.
    server.registerTool(
      'get_current_privileges',
      {
        description: 'Check the permissions and grants of the current database user. Useful for debugging access issues.',
        inputSchema: z.object({}),
      },
      async () => {
        const user = await db.query('SELECT CURRENT_USER() as user');
        const grants = await db.query('SHOW GRANTS');
        return {
          content: [{ 
            type: 'text', 
            text: JSON.stringify({ currentUser: user, grants }, null, 2) 
          }],
        };
      }
    );
  • Input schema definition for get_current_privileges — an empty object schema (no parameters required).
    {
      description: 'Check the permissions and grants of the current database user. Useful for debugging access issues.',
      inputSchema: z.object({}),
    },
Behavior3/5

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

No annotations are provided, so the description carries full burden. It correctly indicates a read operation (checking permissions) but does not disclose any additional behavioral traits (e.g., required permissions, performance impact).

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

Conciseness5/5

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

Two concise sentences with zero wasted words. Every sentence adds value: first states purpose, second gives typical usage context.

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

Completeness3/5

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

Given the tool has no parameters and no output schema, the description is adequate for basic understanding but lacks details about the return format or potential errors, which would enhance completeness.

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?

Schema coverage is 100% (no parameters), so baseline is 3. The description does not need to add parameter-level detail, and it doesn't, but it also doesn't enrich understanding of the tool's behavior beyond the schema.

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

Purpose5/5

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

Clear verb 'Check' and specific resource 'permissions and grants of the current database user'. Distinct from sibling tools like describe_table or mysql_query which deal with other aspects.

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

Usage Guidelines4/5

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

Explicitly states 'Useful for debugging access issues', providing clear context for appropriate use. Does not mention when not to use or alternatives, but this is sufficient for a simple read-only tool.

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/chenkumi/easy-mysql-mcp'

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