Skip to main content
Glama
keonchennl

GraphDB MCP Server

listGraphs

Retrieve all available graphs in a repository via GraphDB MCP Server, enabling efficient exploration and management of RDF datasets for knowledge graph analysis.

Instructions

List all graphs in the repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'listGraphs' tool: executes SPARQL query to fetch and return list of graphs in the repository.
    } else if (request.params.name === "listGraphs") { // Query to get all graphs in the repository const query = ` SELECT DISTINCT ?graph WHERE { GRAPH ?graph { ?s ?p ?o } } ORDER BY ?graph `; try { const result = await executeSparqlQuery(query); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], isError: false, }; } catch (error: any) { return { content: [{ type: "text", text: `Error listing graphs: ${error.message}` }], isError: true, }; } }
  • index.ts:418-425 (registration)
    Tool registration in listTools response: defines name, description, and input schema for 'listGraphs'.
    { name: "listGraphs", description: "List all graphs in the repository", inputSchema: { type: "object", properties: {} }, }

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/keonchennl/mcp-graphdb'

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