NHS MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NHS MCP ServerSearch for paracetamol prescriptions in Jan 2024"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
NHS MCP Server
An MCP (Model Context Protocol) server that provides AI assistants with access to NHS public health datasets. Query prescribing data, explore datasets, and look up NHS organisations directly from Cursor, Claude Desktop, or any MCP-compatible host.
Quick Start
Prerequisites
Node.js 20+
npm
Install and Build
npm install
npm run buildConfigure Cursor
The project includes a .cursor/mcp.json that registers the server automatically. After building, restart Cursor to pick up the MCP server.
To configure manually in any MCP host, register a stdio server:
{
"mcpServers": {
"nhs": {
"command": "node",
"args": ["/path/to/nhs-mcp/dist/index.js"]
}
}
}Related MCP server: OpenFDA FastMCP Server
Available Tools
datasets_list
List all available datasets on the NHSBSA Open Data Portal.
Parameters:
search_query(optional) — Filter datasets by title or description
Example prompt: "List all NHS datasets related to prescribing"
datasets_metadata
Get detailed metadata for a specific dataset, including resource IDs needed for querying.
Parameters:
dataset_id(required) — Dataset name or ID
Example prompt: "Show me the metadata for the English Prescribing Dataset"
datasets_query
Query a specific dataset resource by its resource ID. Use datasets_metadata first to discover resource IDs.
Parameters:
resource_id(required) — The resource ID to queryfilters(optional) — Key-value pairs to filter recordslimit(optional) — Max records to return (default 20, max 100)offset(optional) — Records to skip for pagination
Example prompt: "Query resource abc-123 filtering by BNF_CODE 0407010H0"
prescriptions_search
Search NHS prescribing data from the English Prescribing Dataset (EPD).
Parameters:
bnf_code(optional) — BNF code (e.g.,0407010H0for Paracetamol)drug_name(optional) — Free-text drug name searchpractice_code(optional) — GP practice codeyear_month(optional) — Period in YYYYMM formatresource_id(optional) — Specific EPD resource IDlimit(optional) — Max records (default 20, max 100)
Example prompt: "Search for Paracetamol prescriptions in January 2024"
Data Sources
Source | API | Auth Required |
CKAN Action API | No |
Development
Project Structure
src/
├── mcp/ # MCP protocol layer (tools, server setup)
│ ├── server.ts
│ └── tools/
├── application/ # Business logic (use cases, formatters, types)
│ ├── use-cases/
│ ├── formatters/
│ └── types.ts
└── infrastructure/ # External concerns (API clients, cache, config)
├── clients/
├── cache/
├── config.ts
└── logger.tsCommands
npm run build # Compile TypeScript
npm run dev # Watch mode
npm test # Run tests
npm run test:watch # Watch mode tests
npm start # Start MCP server (stdio)Running Tests
npm testTests mock all external HTTP calls. No network access is required.
License
MIT
Available Tools
9 toolsdatasets_listList NHS DatasetsA
List all available datasets on the NHSBSA Open Data Portal. Returns dataset names, descriptions, and resource counts. Optionally filter by a search term matching title or description.
| Name | Required | Description | Default |
|---|---|---|---|
| search_query | No | Optional text to filter datasets by title or description (e.g., 'prescribing', 'dental') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of disclosing behavior. It explicitly states the return contents and the filtering behavior (matching title or description), which is useful. However, it omits details like pagination, ordering, or case sensitivity, leaving some behavioral aspects untold.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, starts with the core purpose, then lists return fields, then describes the optional filter. Every sentence carries useful information with no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite lacking an output schema, the description explicitly names the return fields, which is sufficient for a simple listing tool. With only one optional parameter and a straightforward purpose, the description covers the essential context for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already provides 100% coverage for the 'search_query' parameter, including the note that it filters by title or description. The description adds examples ('prescribing', 'dental') but otherwise repeats the schema. Baseline for high coverage is 3, and the examples provide marginal added value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists all available datasets on the NHSBSA Open Data Portal and specifies what it returns (names, descriptions, resource counts). This is a specific verb+resource+scope. However, it does not explicitly differentiate from sibling tools like datasets_metadata or datasets_query, though the listing purpose is distinct.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for listing datasets with optional filtering by search term, but it does not provide explicit guidance on when to choose this tool over siblings such as datasets_metadata or datasets_query. There are no exclusions or alternative recommendations, making the usage context adequate but not fully explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
datasets_metadataGet Dataset MetadataA
Get detailed metadata for a specific NHS dataset, including its resources (data files) with their IDs. Use the resource ID with the datasets_query tool to query the actual data.
| Name | Required | Description | Default |
|---|---|---|---|
| dataset_id | Yes | The dataset name or ID (e.g., 'english-prescribing-data-epd') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses that the tool returns metadata and resource IDs, and that actual data is not included (since it directs to datasets_query). However, it does not mention return structure, error behavior, or any permissions, so it remains moderately transparent for a simple read-only metadata tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the main purpose and followed by a clear usage instruction. Every sentence earns its place with no redundancy, achieving excellent conciseness and structure.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one parameter, no output schema), the description covers the essential context: what the tool returns (metadata, resource IDs) and how to proceed (use datasets_query). It lacks a detailed list of returned fields, but this is not critical for a straightforward metadata fetch. The sibling tool context further clarifies its role.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, providing an example for dataset_id. The description adds context by explaining the purpose of the ID (to retrieve metadata for a specific NHS dataset and obtain resource IDs), but it does not add technical details beyond the schema. The baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function with a specific verb and resource: 'Get detailed metadata for a specific NHS dataset'. It also distinguishes itself from siblings by mentioning that it returns resources (data files) and their IDs, which is not a function of datasets_list (listing) or datasets_query (querying data).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly instructs when to use the returned resource ID with the datasets_query tool, giving clear cross-tool guidance. It implies this tool is for retrieving metadata before querying data, though it does not explicitly state when not to use it or compare with datasets_list.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
datasets_queryQuery DatasetA
Query a specific dataset resource on the NHSBSA Open Data Portal by resource ID. Use datasets_metadata first to find resource IDs for a dataset. Supports filtering by field values, pagination with limit and offset.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of records to return (default 20, max 100) | |
| offset | No | Number of records to skip for pagination (default 0) | |
| filters | No | Key-value pairs to filter records (e.g., { "BNF_CODE": "0407010H0" }) | |
| resource_id | Yes | The resource ID to query (get this from datasets_metadata) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of behavioral disclosure. It discloses filtering and pagination behavior, but omits details like return format, error handling, authentication needs, or side effects. This is adequate but leaves gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, using three short sentences to convey purpose, prerequisite, and capabilities. Every sentence earns its place, with no redundancy or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema, and the description does not mention what the response looks like or how to handle errors/empty results. It covers the core usage but leaves out some context that would be helpful for a generic query tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already describes all four parameters with 100% coverage, so the description adds limited value beyond reaffirming the resource_id source and pagination. The mention of 'filtering by field values' aligns with the filters parameter but does not introduce new semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Query a specific dataset resource') and the target resource, distinguishing it from sibling tools like datasets_list and datasets_metadata. It also mentions the required resource ID, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage context by instructing to use datasets_metadata first to obtain resource IDs, and notes the tool supports filtering and pagination. It does not explicitly state when not to use this tool versus alternatives, but the prerequisite guidance is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
organisations_getGet Organisation DetailsA
Get full details for a specific NHS organisation by its ODS code. Returns name, address, roles, relationships, and succession history. Use organisations_search first to find the ODS code.
| Name | Required | Description | Default |
|---|---|---|---|
| ods_code | Yes | The ODS code of the organisation (e.g., 'RR8' for Leeds Teaching Hospitals, 'A81001' for a GP practice) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations present, the description carries the full burden of behavioral disclosure. It clearly states the tool is a read operation ('Get') and enumerates the returned fields, which gives a good sense of what the agent can expect. However, it does not mention error behavior, authentication requirements, or rate limits, and it doesn't explicitly label itself as read-only. A slightly more detailed description (e.g., noting that it returns the full organization record, or that it is safe to call) would push this to 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences and highly efficient. The first sentence delivers the core purpose and expected return data, and the second gives actionable guidance. No filler or redundant information. It is front-loaded and easily scannable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple get-by-ID tool with a well-defined parameter and no output schema, the description is complete enough. It covers what the tool does, what it returns (the key data fields), and how to obtain the required parameter. The presence of sibling tools like organisations_search further contextualizes this tool within the broader workflow. No significant gaps remain for the agent to be left uncertain about when or how to invoke it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% coverage for the single parameter ods_code, so the baseline is 3. The description adds value by framing the ODS code as the key identifier and instructing the agent to obtain it via organisations_search first. This goes beyond the schema's simple definition and provides contextual meaning for the parameter's usage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get full details for a specific NHS organisation by its ODS code.' It includes a specific verb (Get) and resource (organisation details), and lists the exact fields returned (name, address, roles, relationships, succession history). This distinguishes it from siblings like organisations_search (which finds ODS codes) and organisations_relationships (which may only return relationship data).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly provides usage guidance: 'Use organisations_search first to find the ODS code.' This tells the agent when to use this tool versus the search tool, and sets a clear prerequisite for invocation. It effectively communicates the typical workflow context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
organisations_relationshipsGet Organisation RelationshipsA
Get the relationships for a specific NHS organisation (e.g., which ICB commissions a GP practice, which region a trust belongs to). Returns relationship types, target organisations, and status.
| Name | Required | Description | Default |
|---|---|---|---|
| ods_code | Yes | The ODS code of the organisation (e.g., 'RR8', 'A81001') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of behavioral disclosure. It explicitly states what is returned ('relationship types, target organisations, and status'), which is transparent about the data output. Although it does not mention authentication or rate limits, the read-only nature is implied by 'Get' and the focus on return content suffices for a simple read operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long, front-loaded with the main purpose, followed by examples and return structure. Every sentence contributes meaning, with no filler or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple one-parameter tool with no output schema, the description sufficiently explains the purpose, provides examples, and outlines the return fields. It could slightly expand on the full set of relationship types available, but it is adequately complete for a tool of this complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides 100% coverage with a clear description of the ods_code parameter including examples. The tool description adds value by explaining the context of the parameter within relationships but does not add additional semantic detail beyond the schema. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool gets relationships for a specific NHS organisation, with concrete examples (ICB commissions GP practice, region for trust). This clearly distinguishes it from sibling tools like organisations_get or organisations_search, which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
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 the tool: for a specific NHS organisation when you need its relationships. It does not explicitly compare with alternatives or state when not to use it, but the examples and the 'specific NHS organisation' wording make the use case evident.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
organisations_searchSearch NHS OrganisationsA
Search for NHS organisations (GP practices, trusts, ICBs, pharmacies, etc.) by name, role, or postcode using the ODS ORD directory. Returns ODS codes, names, statuses, and primary roles. At least one search parameter (name, role, or postcode) is required.
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Organisation name to search for (e.g., 'Leeds Teaching', 'Boots') | |
| role | No | Primary ODS role ID to filter by (e.g., 'RO76' for GP practices, 'RO197' for NHS trusts, 'RO182' for pharmacies). Use the nhs://organisation-roles resource to see all valid role IDs. | |
| limit | No | Maximum number of results to return (default 20, max 1000) | |
| offset | No | Number of results to skip for pagination (default 0) | |
| status | No | Filter by organisation status. Default returns both active and inactive. | |
| postcode | No | Postcode to search by (e.g., 'LS1', 'SW1A 1AA') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description carries the full burden of disclosing behavior. It states the data source (ODS ORD directory), the return payload (ODS codes, names, statuses, primary roles), and the requirement for at least one search parameter. It doesn't mention pagination details or error handling, but the schema covers limit/offset/status defaults.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise: two sentences that front-load the core purpose, then add the requirement and return info. Every clause earns its place; no redundant or filler content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 6 parameters, no output schema, and no annotations, the description covers the essential high-level semantics: what it searches, what it returns, and the input constraint. The schema fills in parameter defaults and enums. It could be more complete by mentioning pagination behavior or explicitly directing to organisations_get when an ODS code is known, but the current description is adequate for a search tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds value by explicitly naming the three searchable parameters (name, role, postcode) and clarifying that at least one is required, which is not obvious from the schema since all properties are optional. It also highlights that combinations are allowed ('at least one').
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a clear verb+resource: 'Search for NHS organisations', then specifies the search axes (name, role, postcode) and the directory (ODS ORD). It also lists returned fields, distinguishing it from sibling tools like organisations_get (likely by ODS code) and organisations_relationships.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context: search by name/role/postcode, and mandates 'At least one search parameter (name, role, or postcode) is required.' It implies the tool is for finding organisations when you don't have an ODS code, though it does not explicitly contrast with alternatives like organisations_get.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
prescriptions_cost_analysisPrescription Cost AnalysisA
Get prescription cost statistics from the national Prescription Cost Analysis (PCA) dataset. Shows aggregate costs and volumes at the national level (not by practice). Use prescriptions_search for practice-level data instead.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of records to return (default 20, max 100) | |
| bnf_code | No | BNF code to filter by (e.g., '0407010H0' for Paracetamol) | |
| bnf_name | No | Free-text search for drug or chemical substance name | |
| year_month | No | Year and month in YYYYMM format (e.g., '202401') | |
| resource_id | No | Specific PCA resource ID. If omitted, the server will auto-discover the latest PCA resource. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of disclosing behavioral traits. It mentions the scope of data but does not explicitly state that the operation is read-only, lacks any side effects, or requires specific permissions. It also does not describe response structure, pagination, or error behaviors. Given the lack of annotations, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long, front-loaded with the primary action, and includes only essential information. The first sentence states the purpose, and the second adds scope and an explicit alternative. There is no redundant or extraneous content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, so the description should offer some idea of what the tool returns. It does by saying 'Shows aggregate costs and volumes.' For a tool with five parameters and a relatively simple query purpose, the description is adequately complete, though it omits details like pagination or resource auto-discovery (which are in the schema).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description does not add details about any specific parameter beyond what is already in the schema, such as the meaning of limit or bnf_code. It only adds context about the national-level aggregation, which is not parameter-specific. The schema already provides clear descriptions for all five parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Get prescription cost statistics from the national Prescription Cost Analysis (PCA) dataset.' It explicitly notes the national-level scope and differentiates from the sibling tool by directing users to prescriptions_search for practice-level data, satisfying the requirement for a specific verb, resource, and sibling distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage context: it is for national aggregate costs and volumes, and it explicitly says 'not by practice.' It also names the alternative tool for practice-level data ('Use prescriptions_search for practice-level data instead'), giving clear when-to-use and when-not-to-use guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
prescriptions_searchSearch PrescriptionsA
Search NHS prescribing data from the English Prescribing Dataset (EPD). Find prescription records by BNF code, drug name, practice code, or time period. Returns items dispensed, quantities, and costs. At least one search parameter should be provided.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of records to return (default 20, max 100) | |
| bnf_code | No | BNF code to filter by (e.g., '0407010H0' for Paracetamol). Supports partial codes for broader category searches. | |
| drug_name | No | Free-text search for drug name (e.g., 'Paracetamol', 'Amoxicillin') | |
| year_month | No | Year and month in YYYYMM format (e.g., '202401' for January 2024) | |
| resource_id | No | Specific EPD resource ID to query. If not provided, uses a default dataset. Use datasets_metadata on 'english-prescribing-data-epd' to find available resource IDs. | |
| practice_code | No | GP practice code to filter by (e.g., 'A81001') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of behavioral disclosure. It states what the tool returns and imposes a parameter requirement, but it does not disclose default dataset behavior, pagination, error handling, or explicitly confirm it's read-only. Some behavioral traits are implied (search implies read) but not fully specified.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no redundant information. It front-loads the purpose and immediately adds the key usage constraint and return details. Every sentence contributes value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given there is no output schema, the description adequately indicates the return fields (items dispensed, quantities, costs). It also mentions the parameter requirement and available filters. However, it does not describe the list/response structure in more detail or note the default dataset and paging behavior, though some of that is in the schema. It is sufficient for a straightforward search tool but not exhaustive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds a high-level grouping of search parameters ('BNF code, drug name, practice code, or time period') but does not add significant depth beyond the schema's per-parameter descriptions. The constraint on providing at least one parameter is a useful addition.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Search' and the specific resource 'NHS prescribing data from the English Prescribing Dataset (EPD)'. It enumerates the filters (BNF code, drug name, practice code, time period) and return fields (items dispensed, quantities, costs), which distinguishes it from sibling tools like spending trends or cost analysis.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context on when to use the tool: to find prescription records. It also gives an explicit usage constraint ('At least one search parameter should be provided'). However, it does not explicitly mention alternatives or when not to use this tool, leaving some ambiguity relative to siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
prescriptions_spending_trendsPrescribing Spending TrendsA
Analyse prescribing spending trends over time for a drug or BNF category. Data sourced from OpenPrescribing (last 5 years of monthly data). Returns monthly items, quantities, and costs. Can be filtered by organisation (Sub-ICB Location or practice).
| Name | Required | Description | Default |
|---|---|---|---|
| org | No | Specific organisation code to filter by (e.g., 'QWO' for West Yorkshire ICB, 'A81001' for a practice) | |
| bnf_code | Yes | BNF code to analyse (e.g., '0212' for lipid-regulating drugs, '0407010H0' for Paracetamol). Supports section, paragraph, chemical, and presentation codes. | |
| org_type | No | Organisation type to group by: 'sicbl' for Sub-ICB Locations or 'practice' for GP practices |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses the data source (OpenPrescribing), the time range (last 5 years), the granularity (monthly), and the returned fields (items, quantities, costs). It also mentions the filtering option by organisation type. This is more than basic transparency, though it does not discuss pagination or error behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is four sentences long, each contributing essential information (purpose, data source, return values, filtering). It is front-loaded with the main action and avoids unnecessary detail. No filler or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 3 parameters (one required) and no output schema, so the description must explain what the tool returns. It covers the monthly items, quantities, costs, and the organisation filter. However, it does not explicitly state that the output is a time series or how the data is aggregated by org type, but this is partially implied. Overall, it is sufficiently complete for an analysis tool, with a minor gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already explains all parameters thoroughly (bnf_code, org, org_type) with examples. The description adds no new parameter-level meaning beyond restating 'drug or BNF category' and 'filtered by organisation.' Hence, it does not exceed the baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Analyse prescribing spending trends over time for a drug or BNF category.' The verb 'analyse' plus the resource 'prescribing spending trends' and the temporal scope ('over time') is specific. It distinguishes itself from siblings like prescriptions_search or cost_analysis by emphasizing the time trend aspect.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context: this tool is for analysing trends over time, using data from OpenPrescribing, filtering by organisation. However, it does not explicitly mention when not to use it or point to alternative tools for different use cases (e.g., cost comparison). The 'over time' phrasing implies the intended use, but exclusions are absent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
9 tool updates
v0.1.0- First observed
datasets_list - First observed
datasets_metadata - First observed
datasets_query - First observed
organisations_get - First observed
organisations_relationships - First observed
organisations_search - First observed
prescriptions_cost_analysis - First observed
prescriptions_search - First observed
prescriptions_spending_trends
TDQS
Scored across 9 tools
Each tool targets a distinct resource (prescriptions, datasets, organisations) and operation (trends, search, metadata, query, relationships). Even the prescribing tools are clearly differentiated by granularity: time-series trends, record-level search, and national aggregate statistics.
Tool names follow a consistent domain_suffix pattern in snake_case with a clear domain prefix. However, some suffixes are nouns (datasets_metadata, organisations_relationships) rather than verbs, introducing a minor inconsistency in the naming scheme.
Nine tools is an appropriate count, comfortably within the ideal range. Each tool serves a clear purpose, covering three distinct domains, with no redundancy.
The tool surface provides comprehensive coverage for the stated NHS data domains: prescribing data (search, trends, cost analysis), open data portal (list, metadata, query), and organisation directory (search, details, relationships). It enables complete discovery and access workflows.
Maintenance
Related MCP Connectors
Query UK Parliament, elections, crime stats, ONS census data, and national archives
Official UK, US and Australia public datasets as filtered CSV, REST API and MCP for AI agents.
US healthcare data for AI agents: CMS, FDA adverse events, CDC, NPPES NPI. Keyless, real samples.
UK public procurement data for AI agents: tenders, contracts, buyer and supplier profiles.
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables AI assistants to search, explore, and query any CKAN open data portal through natural language, making public datasets accessible without requiring knowledge of the portal's API.20495 npm58MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to query and analyze FDA adverse events, drug labels, medical device clearances, and other public health datasets through natural language commands.14-
- AlicenseBqualityDmaintenanceProvides access to 27 UK government data sources and services, enabling queries about transport, business, healthcare, and more via natural language.331MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to search, query, and analyze CMS healthcare datasets from data.cms.gov, supporting features like dataset discovery, filtering, and CSV download for large-scale analysis.52MIT