Skip to main content
Glama
italia

Schema.gov.it MCP Server

Official
by italia

Query External SPARQL Endpoint

query_external_endpoint
Read-onlyIdempotent

Execute a SPARQL query on any public HTTPS SPARQL endpoint to retrieve structured data from external sources.

Instructions

Execute a SPARQL query against any public HTTPS SPARQL endpoint.

Args:

  • endpointUrl: URL of the target SPARQL endpoint (must be HTTPS)

  • query: SPARQL query to execute

  • injectPrefixes: Whether to inject schema.gov.it standard prefixes (default: false)

Returns:

  • Compressed SPARQL results in the same format as internal tools

Security: Only HTTPS endpoints are allowed. Requests timeout after 15 seconds.

Examples:

When to use this vs X:

  • vs query_sparql: use this only for an external HTTPS endpoint; use query_sparql for the built-in schema.gov.it endpoint

  • vs explore_external_endpoint: use this when you already know the query you want to run; use explore_external_endpoint first if you just need a structural overview

Do not use this if:

  • you want to query schema.gov.it itself → use query_sparql

  • you want a curated shortlist of endpoints → use recommend_external_endpoints

  • you only need endpoints already linked in the catalog metadata → use list_linked_endpoints

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSPARQL query to execute
endpointUrlYesURL of the target SPARQL endpoint (HTTPS required)
injectPrefixesNoWhether to inject schema.gov.it standard prefixes (rdf, rdfs, owl, skos, dct...)
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, destructiveHint=false. The description adds valuable behavioral context: security constraint (HTTPS only), timeout (15 seconds), and return format (compressed results). No contradiction.

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 well-organized with clear section headers (Args, Returns, Security, Examples, When to use). Each sentence adds value, no repetition. Appropriate length given complexity (11 lines).

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

Completeness5/5

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

The description covers all critical aspects: purpose, parameters, security, return format, usage guidance with alternatives, and examples. Despite no output schema, the return description is sufficient. For a tool with 3 parameters and security considerations, this is complete.

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

Parameters4/5

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

Schema coverage is 100% with descriptions for all three parameters. The description adds value with examples (DBpedia, EU Publications Office), clarifies the injectPrefixes default, and reiterates security constraint on endpointUrl. This goes beyond baseline 3.

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 it executes SPARQL queries against any public HTTPS SPARQL endpoint, with specific verb 'Execute a SPARQL query' and resource 'public HTTPS SPARQL endpoint'. It distinguishes from siblings like query_sparql (internal endpoint) and explore_external_endpoint (structural overview).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly provides a 'When to use this vs X' section with clear alternatives (query_sparql, explore_external_endpoint, recommend_external_endpoints, list_linked_endpoints) and a 'Do not use this if' section with specific conditions and correct tool recommendations.

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/italia/dati-semantic-mcp'

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