Skip to main content
Glama
dalboki

sonsuchup-mcp

by dalboki

delete_case

Permanently delete a case and all related data, including people, alibis, and records. This action is irreversible.

Instructions

사건을 영구 삭제합니다. 인물·알리바이·기록 등 자식 데이터도 함께 삭제되며 되돌릴 수 없습니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • The handler function for delete_case that calls the Supabase RPC 'mcp_delete_case' with the case ID and returns success.
    handler: async ({ id }: { id: string }) => {
      await callRpc<null>('mcp_delete_case', { p_id: id });
      return { ok: true, listUrl: listUrl() };
    },
  • Input schema for delete_case: requires a single 'id' field as a UUID string.
    inputSchema: z.object({ id: z.string().uuid() }),
  • src/tools.ts:301-309 (registration)
    delete_case is defined as an entry in the tools array in src/tools.ts, registered with name, description, inputSchema, and handler.
    {
      name: 'delete_case',
      description: '사건을 영구 삭제합니다. 인물·알리바이·기록 등 자식 데이터도 함께 삭제되며 되돌릴 수 없습니다.',
      inputSchema: z.object({ id: z.string().uuid() }),
      handler: async ({ id }: { id: string }) => {
        await callRpc<null>('mcp_delete_case', { p_id: id });
        return { ok: true, listUrl: listUrl() };
      },
    },
  • Helper function callRpc that wraps supabase.rpc calls, injecting the MCP token for authentication.
    export async function callRpc<T = unknown>(
      fn: string,
      args: Record<string, unknown> = {},
    ): Promise<T> {
      const { data, error } = await supabase.rpc(fn, { p_token: TOKEN, ...args });
      if (error) {
        const msg = error.message || 'unknown error';
        if (/invalid or revoked MCP token/i.test(msg)) {
          throw new Error('MCP 토큰이 유효하지 않거나 폐기되었습니다. 손수첩 설정에서 새 토큰을 발급하세요.');
        }
        throw new Error(`Supabase RPC ${fn} 실패: ${msg}`);
      }
      return data as T;
    }
Behavior4/5

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

With no annotations provided, the description effectively discloses that deletion is permanent and cascades to child data (people, alibis, records). This covers the key behavioral traits for a delete operation.

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 sentences, no superfluous words. The main action is front-loaded, and the critical behavioral warning is provided succinctly.

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

Completeness4/5

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

Given the simple nature of the tool (single param, no output schema), the description covers the essential behavioral aspects. It does not address error handling or how to retrieve the ID, but these are not necessary for basic usage.

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

Parameters2/5

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

The input schema has 0% description coverage, and the tool description does not explain the 'id' parameter. Although the parameter's purpose is inferable from context, the description fails to add any explicit 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 tool's action (permanently delete a case) and the resource (case). It distinguishes from siblings as there are no other delete tools among the listed siblings.

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?

The description explicitly warns about irreversibility and cascading deletion, guiding the agent to use it only when certain. No explicit 'when not to use' is given, but the context makes it clear this is the dedicated delete 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/dalboki/sonsuchup-mcp'

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