Skip to main content
Glama
us-all

openmetadata-mcp-server

by us-all

update-database-service

Update a database service with JSON Patch operations by providing its UUID and a list of changes.

Instructions

Update a database service using JSON Patch

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesService UUID
operationsYesJSON Patch operations

Implementation Reference

  • The handler function that executes the 'update-database-service' tool logic: validates write access, then sends a PATCH request to /services/databaseServices/{id} with JSON Patch operations.
    export async function updateDatabaseService(params: z.infer<typeof updateDatabaseServiceSchema>) {
      assertWriteAllowed();
      return omClient.patch(`/services/databaseServices/${params.id}`, params.operations);
    }
  • Zod schema defining input validation for 'update-database-service': requires an 'id' (string UUID) and 'operations' (array of JSON Patch operations).
    export const updateDatabaseServiceSchema = z.object({
      id: z.string().describe("Service UUID"),
      operations: z.array(z.record(z.string(), z.any())).describe("JSON Patch operations"),
    });
  • src/index.ts:215-215 (registration)
    Registration of the 'update-database-service' tool in the MCP server, mapping the schema and handler.
    tool("update-database-service", "Update a database service using JSON Patch", updateDatabaseServiceSchema.shape, wrapToolHandler(updateDatabaseService));
  • wrapToolHandler wraps the raw handler with error handling and redaction logic, created via createWrapToolHandler from @us-all/mcp-toolkit.
    export const wrapToolHandler = createWrapToolHandler({
      redactionPatterns: [/OPENMETADATA_TOKEN/i],
      errorExtractors: [
        {
          match: (error) => error instanceof WriteBlockedError,
          extract: (error) => ({
            kind: "passthrough",
            text: (error as WriteBlockedError).message,
          }),
        },
        {
          match: (error) => error instanceof OpenMetadataError,
          extract: (error) => {
            const err = error as OpenMetadataError;
            return {
              kind: "structured",
              data: {
                message: err.message,
                status: err.status,
                details: err.body,
              },
            };
          },
        },
      ],
    });
  • assertWriteAllowed is called by the handler to ensure write operations are enabled in config.
    export function assertWriteAllowed(): void {
      if (!config.allowWrite) {
        throw new WriteBlockedError();
      }
    }
Behavior2/5

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

With no annotations, the description carries the full burden. It only states 'Update' and 'JSON Patch', but does not disclose behavioral traits such as whether the update is partial or full, synchronous, idempotent, or what happens to omitted fields. The agent cannot fully understand the operation's side effects.

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 sentence with no redundancy. It effectively communicates the core action. However, it could be slightly more informative without sacrificing conciseness.

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?

Given the absence of an output schema, the description does not explain the return value or error conditions. For a mutation tool, it omits important context such as whether the service must exist beforehand or if the operation is reversible. The agent may lack sufficient information to use it safely.

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 description coverage is 100% (both parameters have descriptions). The description adds the context of 'JSON Patch' but this is already explicit in the operations parameter description. Thus, the description provides minimal added meaning 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?

The description clearly states the action ('Update') and resource ('database service') using a specific method ('JSON Patch'). It distinguishes this tool from sibling tools like create-database-service, get-database-service, and delete-database-service, making its purpose unambiguous.

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?

No guidance is provided on when to use this tool versus alternatives. There is no mention of prerequisites, such as whether the service must already exist, or when to prefer create over update. The agent must infer usage from the tool name and schema.

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/us-all/openmetadata-mcp-server'

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