Skip to main content
Glama

mcp_sparql_update

Execute SPARQL update queries to modify data in GraphDB repositories. Supports INSERT DATA, DELETE DATA, INSERT-WHERE, and DELETE-WHERE operations for adding, removing, or updating triples in ontology graphs.

Instructions

SPARQL 업데이트 쿼리를 실행하여 데이터를 수정합니다. INSERT DATA, DELETE DATA, INSERT-WHERE, DELETE-WHERE 등의 SPARQL 1.1 Update 문법을 지원합니다. 새로운 트리플 추가, 기존 트리플 삭제, 조건부 데이터 변경 등 다양한 그래프 수정 작업을 수행할 수 있습니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endpointNoSPARQL 엔드포인트 URL
queryYes실행할 SPARQL 업데이트 쿼리 (예: INSERT DATA { <subject> <predicate> <object> })
repositoryNo업데이트 쿼리를 실행할 리포지토리 이름

Implementation Reference

  • The handler function that executes the mcp_sparql_update tool by calling SparqlService.updateQuery.
    async handler(args: UpdateQueryArgs): Promise<ToolResponse> {
      try {
        if (args.endpoint) {
          const service = new SparqlService({
            endpoint: args.endpoint,
            defaultRepository: args.repository || ''
          });
          const result = await service.updateQuery(args.query, args.repository);
          return {
            content: [{
              type: 'text',
              text: JSON.stringify(result, null, 2)
            }]
          };
        } else {
          const result = await sparqlService.updateQuery(args.query, args.repository);
          return {
            content: [{
              type: 'text',
              text: JSON.stringify(result, null, 2)
            }]
          };
        }
      } catch (error) {
        return {
          content: [{
            type: 'text',
            text: `업데이트 쿼리 실행 오류: ${error instanceof Error ? error.message : String(error)}`
          }]
        };
      }
    }
  • The input schema defining parameters for the mcp_sparql_update tool.
    inputSchema: {
      type: 'object',
      properties: {
        query: {
          type: 'string',
          description: '실행할 SPARQL 업데이트 쿼리 (예: INSERT DATA { <subject> <predicate> <object> })'
        },
        repository: {
          type: 'string',
          description: '업데이트 쿼리를 실행할 리포지토리 이름'
        },
        endpoint: {
          type: 'string',
          description: 'SPARQL 엔드포인트 URL'
        }
      },
      required: ['query']
    },
  • src/index.ts:24-56 (registration)
    MCP server capabilities registration listing mcp_sparql_update as available tool.
      capabilities: {
        tools: {
          mcp_sparql_execute_query: true,
          mcp_sparql_update: true,
          mcp_sparql_list_repositories: true,
          mcp_sparql_list_graphs: true,
          mcp_sparql_get_resource_info: true,
          mcp_ollama_run: true,
          mcp_ollama_show: true,
          mcp_ollama_pull: true,
          mcp_ollama_list: true,
          mcp_ollama_rm: true,
          mcp_ollama_chat_completion: true,
          mcp_ollama_status: true,
          mcp_http_request: true,
          mcp_openai_chat: true,
          mcp_openai_image: true,
          mcp_openai_tts: true,
          mcp_openai_transcribe: true,
          mcp_openai_embedding: true,
          mcp_gemini_generate_text: true,
          mcp_gemini_chat_completion: true,
          mcp_gemini_list_models: true,
          mcp_gemini_generate_images: false,
          mcp_gemini_generate_image: false,
          mcp_gemini_generate_videos: false,
          mcp_gemini_generate_multimodal_content: false,
          mcp_imagen_generate: false,
          mcp_gemini_create_image: false,
          mcp_gemini_edit_image: false
        },
      },
    }
  • TypeScript interface defining the input arguments for the SPARQL update tool.
    export interface UpdateQueryArgs {
      query: string;
      repository?: string;
      endpoint?: string;
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden. It clearly indicates this is a data modification tool ('데이터를 수정합니다', '그래프 수정 작업'), which implies mutation and potential destructive changes. However, it doesn't disclose behavioral traits like authentication requirements, rate limits, error handling, or what happens on success/failure. The description adds basic context about supported SPARQL update syntax but lacks operational details.

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?

The description is perfectly concise and well-structured. Two sentences efficiently convey the tool's purpose, supported syntax, and capabilities. Every sentence earns its place: the first states the core function, the second elaborates on supported operations. No wasted words or redundancy.

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 this is a mutation tool with no annotations and no output schema, the description is somewhat incomplete. It adequately explains what the tool does at a high level but lacks important context about behavioral aspects (permissions, side effects, error conditions) and what the tool returns. The description compensates somewhat by specifying the types of SPARQL update operations supported, but more operational context would be helpful for a data modification 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?

Schema description coverage is 100%, so the schema already documents all three parameters (endpoint, query, repository) with their descriptions. The description doesn't add any parameter-specific information beyond what's in the schema. It mentions SPARQL update query examples generally but doesn't provide additional syntax or format details for the parameters.

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 purpose: executing SPARQL update queries to modify data. It specifies the exact action ('실행하여 데이터를 수정합니다' - execute to modify data) and resource (SPARQL data), distinguishing it from sibling tools like mcp_sparql_execute_query (which likely handles read-only queries) by focusing on updates rather than queries.

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 provides clear context for when to use this tool: for SPARQL 1.1 Update operations like INSERT DATA, DELETE DATA, etc. It implicitly distinguishes from mcp_sparql_execute_query by specifying update operations, but doesn't explicitly state when NOT to use it or name alternatives, though the sibling list suggests mcp_sparql_execute_query as a likely read-only alternative.

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

Related 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/bigdata-coss/agent_mcp'

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