Skip to main content
Glama

mcp_sparql_get_resource_info

Retrieve all properties and values for a specified resource URI using SPARQL queries on the Ontology MCP server, enabling efficient ontology data extraction and analysis.

Instructions

지정된 URI에 대한 모든 속성과 값을 조회합니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endpointNoSPARQL 엔드포인트 URL
repositoryNo조회할 리포지토리 이름
uriYes조회할 리소스의 URI

Implementation Reference

  • The MCP tool handler function for 'mcp_sparql_get_resource_info'. Handles input arguments, optionally creates a new SparqlService instance if endpoint provided, calls getResourceInfo, formats result as JSON, and handles errors.
    async handler(args: GetResourceInfoArgs): Promise<ToolResponse> {
      try {
        if (args.endpoint) {
          const service = new SparqlService({
            endpoint: args.endpoint,
            defaultRepository: args.repository || ''
          });
          const resourceInfo = await service.getResourceInfo(args.uri, args.repository);
          return {
            content: [{
              type: 'text',
              text: JSON.stringify(resourceInfo, null, 2)
            }]
          };
        } else {
          const resourceInfo = await sparqlService.getResourceInfo(args.uri, args.repository);
          return {
            content: [{
              type: 'text',
              text: JSON.stringify(resourceInfo, null, 2)
            }]
          };
        }
      } catch (error) {
        return {
          content: [{
            type: 'text',
            text: `리소스 정보 조회 오류: ${error instanceof Error ? error.message : String(error)}`
          }]
        };
      }
    }
  • Input schema validation for the tool parameters: uri (required), repository (optional), endpoint (optional).
    inputSchema: {
      type: 'object',
      properties: {
        uri: {
          type: 'string',
          description: '조회할 리소스의 URI'
        },
        repository: {
          type: 'string',
          description: '조회할 리포지토리 이름'
        },
        endpoint: {
          type: 'string',
          description: 'SPARQL 엔드포인트 URL'
        }
      },
      required: ['uri']
  • src/index.ts:26-53 (registration)
    MCP server capabilities registration declaring 'mcp_sparql_get_resource_info' as an available tool (true).
    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
  • Core helper method in SparqlService that constructs and executes a SPARQL SELECT query to retrieve all predicate-object pairs (?p ?o) for the given resource URI.
    /**
     * 리소스 정보 조회
     */
    async getResourceInfo(uri: string, repository?: string): Promise<any> {
      const repo = repository || this.config.defaultRepository;
      
      try {
        const response = await this.executeQuery(`
          SELECT ?p ?o
          WHERE {
            <${uri}> ?p ?o .
          }
        `, repo);
        
        return response;
      } catch (error) {
        throw new Error(`리소스 정보 조회 오류: ${error}`);
      }
    }
  • TypeScript interface defining the input arguments for GetResourceInfoArgs used in the tool handler.
    /**
     * 리소스 정보 조회 도구 인수
     */
    export interface GetResourceInfoArgs {
      uri: string;
      repository?: string;
      endpoint?: string;
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. While '조회합니다' (retrieves/query) implies a read-only operation, it doesn't explicitly state whether this requires authentication, has rate limits, returns paginated results, or what format the output takes. For a tool with 3 parameters and no annotation coverage, this leaves significant behavioral gaps.

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 a single, efficient sentence in Korean that directly states the tool's core function. It's appropriately sized for a retrieval tool and front-loads the essential information without any wasted words or unnecessary elaboration.

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 3 parameters with 100% schema coverage but no annotations and no output schema, the description is minimally adequate. It explains what the tool does at a high level but doesn't provide behavioral context (authentication, rate limits, output format) or usage guidance relative to sibling tools. For a SPARQL query tool with no output schema, more context about return values would be helpful.

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%, with all 3 parameters well-documented in the schema itself. The description mentions '지정된 URI' (specified URI) which aligns with the 'uri' parameter, but adds no additional semantic context beyond what the schema already provides. With complete schema coverage, the baseline score of 3 is appropriate.

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 tool's purpose: '조회합니다' (retrieves/query) '모든 속성과 값을' (all properties and values) for a '지정된 URI' (specified URI). It uses specific verb+resource language that tells what the tool does. However, it doesn't distinguish from its SPARQL siblings like mcp_sparql_execute_query or mcp_sparql_list_graphs, which prevents a perfect score.

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. It doesn't mention sibling tools like mcp_sparql_execute_query (which could also retrieve resource info with a custom query) or mcp_sparql_list_graphs (which might list resources). There's no context about when this specific retrieval method is preferred over other approaches.

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