DHLAB MCP Server
The DHLAB MCP Server provides tools for searching and analyzing the National Library of Norway's digital collections, enabling text analysis, linguistic research, and corpus statistics.
Text Search: Search the digital collection for books, newspapers, or journals by keyword, with optional filters for year range and media type.
NGram Frequency Analysis: Analyze and compare word frequency trends over time across book or newspaper corpora (1810–2020).
Concordance (HTML): Retrieve HTML-formatted in-context occurrences of a word within a specific document, useful for display purposes.
Concordance (Structured): Retrieve clean, structured concordance data (before/target/after fields) for programmatic analysis of word contexts.
Collocations: Discover words that frequently appear near a target word within a document, with a configurable context window.
Word Form Lookup: Retrieve all morphological forms of a given Norwegian word.
Word Lemma Lookup: Find the base/dictionary form (lemma) of a given Norwegian word.
Image Search: Search for images in the digital collection by keyword and optional year range.
Corpus Statistics: Retrieve statistical metadata about a set of documents identified by their URNs.
Click on "Install 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., "@DHLAB MCP Serversearch for texts about Ibsen from 1900-1950"
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.
dhlab-mcp
MCP server providing access to DHLAB (National Library of Norway Digital Humanities Lab) functionality through the Model Context Protocol.
Overview
This server exposes tools for:
Text search: Search the National Library's digital text collection
NGram analysis: Analyze word frequency trends over time
Concordance: Find word contexts in documents
Collocations: Discover words that appear together
Word lookup: Look up Norwegian word forms and lemmas
Image search: Search for images in the digital collection
Corpus statistics: Get information about document collections
Related MCP server: KB MCP Server
Installation
This project uses uv, which can be installed with:
# On macOS and Linux.
curl -LsSf https://astral.sh/uv/install.sh | shClone and install:
git clone https://github.com/marksverdhei/dhlab-mcp.git
cd dhlab-mcp
uv sync --devOr install directly:
pip install git+https://github.com/marksverdhei/dhlab-mcp.gitUsage
Configuring in Claude Code CLI
Add the MCP server to your Claude Code configuration:
# inside the repo directory:
claude mcp add --transport stdio dhlab -- uv --directory $PWD run dhlab-mcpor under user scope:
claude mcp add --scope user --transport stdio dhlab -- uv --directory $PWD run dhlab-mcpVerify the server is added:
claude mcp listThe DHLAB tools will then be available in your Claude Code sessions.
Running the MCP Server Standalone
You can also run the server directly for testing:
dhlab-mcpOr in development mode:
uv run dhlab-mcpRunning as a Local HTTP API
To run the MCP server as a local HTTP API on a custom port:
# Run on default port 8000
dhlab-mcp --transport http
# Run on a custom port
dhlab-mcp --transport http --port 9000
# Run on a specific host and port
dhlab-mcp --transport http --host 0.0.0.0 --port 8080The server supports the following transport options:
stdio(default): Standard input/output for CLI integrationhttp: Streamable HTTP transport (recommended for network access)sse: Server-Sent Events transport (legacy, for backward compatibility)
Once running, the HTTP server will be available at http://<host>:<port>/mcp/.
Available Tools
1. search_texts
Search for texts in the digital collection.
{
"query": "ibsen",
"limit": 10,
"from_year": 1900,
"to_year": 1950,
"media_type": "aviser" # or "bøker", "tidsskrift"
}2. ngram_frequencies
Get word frequency trends over time.
{
"words": ["frihet", "demokrati"],
"corpus": "bok", # or "avis"
"from_year": 1810,
"to_year": 2020
}3. find_concordances
Find word contexts in a document (returns HTML-formatted text).
{
"urn": "URN:NBN:no-nb_digibok_2008051404065",
"word": "Norge",
"window": 25
}Output format: HTML-formatted concordance with <b> tags highlighting matches.
4. word_concordance
Find word contexts with structured output (no HTML formatting).
{
"urn": "URN:NBN:no-nb_digibok_2008051404065",
"word": "Norge",
"window": 12
}Output format: Clean structured data with separate fields:
dhlabid: Document identifierbefore: Text before the matched wordtarget: The matched word itselfafter: Text after the matched word
Use cases:
Use
find_concordancesfor display/UI (HTML-formatted)Use
word_concordancefor analysis/processing (structured data)
5. find_collocations
Find words that appear near the target word.
{
"urn": "URN:NBN:no-nb_digibok_2008051404065",
"word": "frihet",
"window": 5
}6. lookup_word_forms
Look up different forms of a Norwegian word.
{
"word": "løpe"
}7. lookup_word_lemma
Look up the lemma (base form) of a word.
{
"word": "løper"
}8. search_images
Search for images in the collection.
{
"query": "Oslo",
"limit": 10,
"from_year": 1900,
"to_year": 1950
}9. get_corpus_statistics
Get statistics about a set of documents.
{
"urns": ["URN:NBN:no-nb_digibok_2008051404065"]
}Development
For development, install with:
uv sync --devRun tests:
pytestFormat code:
ruff format src/ tests/About DHLAB
DHLAB is a Python library for qualitative and quantitative analyses of digital texts from the National Library of Norway's collection. For more information, visit:
License
See LICENSE file.
Available Tools
9 toolsfind_collocationsB
Find collocations (words that appear near the target word) in a document.
Args: urn: URN identifier for the document word: Target word to find collocations for window: Size of context window (default: 5) limit: Maximum number of collocations to return (default: 100)
Returns: JSON string containing collocation statistics
| Name | Required | Description | Default |
|---|---|---|---|
| urn | Yes | ||
| word | Yes | ||
| window | No | ||
| limit | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool returns 'JSON string containing collocation statistics,' which hints at a read-only operation, but doesn't clarify if it's safe, has rate limits, requires authentication, or what the statistics include. This is inadequate for a tool with computational analysis.
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 well-structured and appropriately sized. It starts with a clear purpose sentence, followed by an 'Args' section listing parameters with defaults, and ends with return information. Every sentence adds value, though the 'Returns' line could be more specific about the JSON 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 moderate complexity (4 parameters, no annotations, but has an output schema), the description is partially complete. It covers parameters well but lacks behavioral context and usage guidelines. The output schema existence reduces the need to detail return values, but more operational guidance would improve completeness.
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 0%, so the description must compensate. It adds meaningful semantics: 'URN identifier for the document,' 'Target word to find collocations for,' 'Size of context window (default: 5),' and 'Maximum number of collocations to return (default: 100).' This clarifies all 4 parameters beyond their schema types, though it could detail units or constraints like window size limits.
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: 'Find collocations (words that appear near the target word) in a document.' It specifies the verb ('Find'), resource ('collocations'), and scope ('in a document'). However, it doesn't explicitly differentiate from sibling tools like 'find_concordances' or 'word_concordance', which might have overlapping functionality with text 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 no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools or contexts where this tool is preferred, such as for statistical analysis of word associations rather than simple concordance searches. This leaves the agent without clear usage boundaries.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_concordancesC
Find concordances (contexts) for a word in a specific document.
Args: urn: URN identifier for the document word: Word to find concordances for window: Number of words before and after the match (default: 25) limit: Maximum number of concordances to return (default: 100)
Returns: JSON string containing concordance results
| Name | Required | Description | Default |
|---|---|---|---|
| urn | Yes | ||
| word | Yes | ||
| window | No | ||
| limit | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
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 behavioral disclosure. It mentions the tool returns 'JSON string containing concordance results,' which adds some context about output format. However, it lacks details on permissions, rate limits, error handling, or whether it's read-only (implied but not stated). For a tool with no annotations, this is a significant gap in transparency.
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 well-structured and appropriately sized, with a clear purpose statement followed by parameter details and return information. Each sentence adds value, and there's no redundant or verbose content. It could be slightly more front-loaded by emphasizing key usage, but overall it's efficient.
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 an output schema (implied by 'Returns' statement) and no annotations, the description covers the basics: purpose, parameters, and return format. However, for a tool with 4 parameters and sibling tools that might cause confusion, it lacks context on differentiation, error cases, or behavioral nuances. It's minimally adequate but has clear gaps in completeness.
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 description includes an 'Args' section that lists and briefly explains all four parameters, adding meaning beyond the input schema (which has 0% description coverage). It clarifies the purpose of 'urn' and 'word' as required, and provides default values and intent for 'window' and 'limit'. However, it doesn't elaborate on URN format, word case-sensitivity, or constraints, leaving some semantic gaps.
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: 'Find concordances (contexts) for a word in a specific document.' It specifies the verb ('find'), resource ('concordances'), and scope ('for a word in a specific document'), making the intent unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'word_concordance' or 'search_texts', which appear related, preventing 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.
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. With sibling tools such as 'word_concordance' and 'search_texts' that might overlap in functionality, there's no mention of specific contexts, exclusions, or comparisons. Usage is implied only by the purpose statement, lacking explicit direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_corpus_statisticsC
Get statistical information about a corpus of documents.
Args: urns: List of URN identifiers for documents
Returns: JSON string containing corpus statistics
| Name | Required | Description | Default |
|---|---|---|---|
| urns | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
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 behavioral disclosure. It mentions that the tool returns 'JSON string containing corpus statistics,' which hints at output format, but does not cover critical aspects like whether it's read-only, performance implications, error handling, or data size limits. For a tool with no annotations, 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, with the core purpose stated first. The additional details about args and returns are structured but slightly verbose (e.g., 'JSON string' could be more concise). Overall, it avoids unnecessary fluff, earning a high score for efficiency.
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 moderate complexity (1 parameter, no annotations, but has an output schema), the description is minimally adequate. The output schema likely covers return values, reducing the need for detailed output explanation. However, with no annotations and low parameter clarity, it lacks completeness in behavioral and usage aspects, making it just viable but with clear gaps.
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 0%, so the description must compensate for undocumented parameters. It adds minimal value: it names the parameter ('urns') and describes it as 'List of URN identifiers for documents,' but does not explain what URNs are, their format, or constraints. This is insufficient to fully clarify the parameter's meaning beyond the basic schema.
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 statistical information about a corpus of documents.' It specifies the verb ('Get') and resource ('corpus of documents'), making the function unambiguous. However, it does not explicitly differentiate from sibling tools like 'ngram_frequencies' or 'search_texts', which might also involve corpus analysis, preventing a score of 5.
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?
No guidance is provided on when to use this tool versus alternatives. The description lacks context about scenarios where statistical information is needed over other operations like searching or concordance analysis. Without explicit when/when-not instructions or named alternatives, it offers minimal usage direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lookup_word_formsC
Look up different forms of a Norwegian word.
Args: word: The word to look up
Returns: JSON string containing different word forms
| Name | Required | Description | Default |
|---|---|---|---|
| word | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
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 behavioral disclosure. It mentions the return format ('JSON string containing different word forms'), which adds some context, but lacks details on error handling, rate limits, authentication needs, or what specific forms are included (e.g., inflections, derivations). This is a significant gap for a tool with no annotation coverage.
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 appropriately sized and front-loaded, with the core purpose stated first. The 'Args' and 'Returns' sections are structured but could be more integrated. There's no wasted text, though it could be slightly more polished for readability.
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 low complexity (one parameter) and the presence of an output schema (which handles return values), the description is somewhat complete but has gaps. It covers the basic purpose and return format but lacks behavioral details and usage guidelines, making it minimally viable but not fully helpful for an agent.
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 description adds minimal semantics beyond the input schema. It states 'word: The word to look up,' which clarifies the parameter's purpose but doesn't provide format details (e.g., case sensitivity, language variants) or examples. With 0% schema description coverage and only one parameter, this is adequate but not comprehensive, aligning with the baseline for low coverage.
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: 'Look up different forms of a Norwegian word.' It specifies the verb ('look up'), resource ('Norwegian word'), and scope ('different forms'). However, it doesn't explicitly differentiate from sibling tools like 'lookup_word_lemma', which might provide related but distinct functionality.
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 no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools (e.g., 'lookup_word_lemma' for lemmas or 'find_collocations' for word combinations) or specify contexts where this tool is preferred. Usage is implied by the purpose but not explicitly stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lookup_word_lemmaC
Look up the lemma (base form) of a Norwegian word.
Args: word: The word to look up
Returns: JSON string containing lemma information
| Name | Required | Description | Default |
|---|---|---|---|
| word | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the return format ('JSON string') but doesn't describe error handling, rate limits, authentication needs, or what happens with invalid inputs. For a lookup tool with zero annotation coverage, this leaves significant gaps in understanding its 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 efficiently structured with a clear purpose statement followed by separate Args and Returns sections. It avoids redundancy and wastes no words, though the 'JSON string' return specification could be slightly more informative (e.g., mentioning structure or keys).
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 low complexity (single parameter) and the presence of an output schema (which handles return values), the description is reasonably complete for basic use. However, the lack of annotations and minimal behavioral context means users might not fully understand error cases or operational limits.
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 description coverage is 0%, but the description explicitly documents the single parameter 'word' and its purpose ('The word to look up'). This adds meaningful context beyond the bare schema. However, it doesn't specify constraints like word length, character set, or handling of compound words, leaving some ambiguity.
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 ('look up') and resource ('lemma of a Norwegian word'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this tool from its sibling 'lookup_word_forms', which likely serves a related but distinct function.
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 no guidance on when to use this tool versus alternatives like 'lookup_word_forms' or other sibling tools. It states what the tool does but offers no context about appropriate use cases, prerequisites, or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ngram_frequenciesB
Get word frequency trends over time using NGram analysis.
Args: words: List of words to analyze corpus: Corpus type. Options: 'bok' (books), 'avis' (newspapers). Default: 'bok' from_year: Start year (default: 1810) to_year: End year (default: 2020) smooth: Smoothing parameter for the frequency curve (default: 1)
Returns: JSON string containing frequency data over time
| Name | Required | Description | Default |
|---|---|---|---|
| words | Yes | ||
| corpus | No | bok | |
| from_year | No | ||
| to_year | No | ||
| smooth | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
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 behavioral disclosure. It mentions the tool returns 'JSON string containing frequency data over time', which gives some output context, but fails to address critical aspects like rate limits, error handling, data sources, or performance characteristics. For a tool with 5 parameters and no 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 appropriately sized and front-loaded: the first sentence states the core purpose, followed by a structured 'Args' and 'Returns' section. Every sentence earns its place by defining parameters and output without redundancy. It's efficient and well-organized for a tool with multiple parameters.
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 5 parameters, 0% schema coverage, no annotations, but an output schema exists, the description is moderately complete. It covers parameter semantics well and notes the return format, but lacks behavioral details like data accuracy, limitations, or error cases. The output schema reduces the need to explain return values, but more context on tool behavior would improve completeness.
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 0%, so the description must compensate. It effectively adds meaning by explaining each parameter's purpose: 'words' as a list to analyze, 'corpus' with options ('bok' for books, 'avis' for newspapers), and default values for 'from_year', 'to_year', and 'smooth'. This provides clear semantics beyond the bare schema, though it could elaborate on 'smooth' effects.
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 word frequency trends over time using NGram analysis.' It specifies the verb ('Get'), resource ('word frequency trends'), and method ('NGram analysis'), making it distinct from siblings like 'find_collocations' or 'lookup_word_lemma'. However, it doesn't explicitly differentiate from all siblings, such as 'get_corpus_statistics', which might overlap in scope.
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 no guidance on when to use this tool versus alternatives. It lacks context about scenarios where NGram frequency analysis is preferred over other tools like 'search_texts' or 'word_concordance', and offers no exclusions or prerequisites. Usage is implied through the description but not explicitly stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_imagesB
Search for images in the National Library's digital collection.
Args: query: Search query string limit: Maximum number of results (default: 10) from_year: Start year (optional) to_year: End year (optional)
Returns: JSON string containing image search results with URLs
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| limit | No | ||
| from_year | No | ||
| to_year | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
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 behavioral disclosure. It mentions the tool returns 'JSON string containing image search results with URLs', which adds some context about the output format. However, it doesn't cover important aspects like rate limits, authentication needs, pagination, error handling, or whether it's a read-only operation. For a search tool with no annotations, this leaves significant 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 well-structured and appropriately sized. It starts with a clear purpose statement, followed by organized sections for Args and Returns. Each sentence serves a specific function without redundancy. However, the 'Returns' section could be slightly more concise by integrating with the purpose statement.
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 moderate complexity (4 parameters, no annotations, but with an output schema), the description is partially complete. It covers parameters well and mentions the output format, but lacks usage guidelines, behavioral details, and differentiation from siblings. The output schema existence reduces the need to fully explain return values, but more context is needed for effective agent use.
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 0%, so the description must compensate. It provides clear semantics for all 4 parameters: 'query' as a search string, 'limit' as maximum results with default, and 'from_year'/'to_year' as optional year filters. This adds meaningful context beyond the bare schema types, though it could elaborate on query syntax or year format constraints.
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: 'Search for images in the National Library's digital collection.' This specifies the verb ('search'), resource ('images'), and context ('National Library's digital collection'). However, it doesn't explicitly differentiate from sibling tools like 'search_texts', which searches texts rather than images, though this distinction is somewhat implied by the resource type.
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 no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'search_texts' for text searches or other tools for different types of queries. There's no context on prerequisites, constraints, or typical use cases beyond the basic function.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_textsA
Search for texts in the National Library's digital collection.
Args: query: Search query string limit: Maximum number of results to return (default: 10) from_year: Start year for search period (optional) to_year: End year for search period (optional) media_type: Type of media to search. Options: 'digavis' (newspapers), 'digibok' (books), 'digitidsskrift' (journals). Default: 'digavis'
Returns: JSON string containing search results with metadata
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| limit | No | ||
| from_year | No | ||
| to_year | No | ||
| media_type | No | digavis |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses the return format (JSON string with metadata) and default behaviors (limit default, media_type default), but doesn't mention rate limits, authentication requirements, pagination, error conditions, or whether this is a read-only operation (though 'search' implies read-only).
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?
Well-structured with clear sections (purpose, Args, Returns). The purpose statement is front-loaded. The parameter explanations are efficient, though the media_type explanation could be slightly more concise. Every sentence adds 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 5 parameters with 0% schema coverage and no annotations, the description does an excellent job explaining parameters and return format. The output schema exists, so return values don't need explanation. However, with multiple sibling tools and no usage guidance, there's a gap in helping the agent choose between alternatives.
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?
With 0% schema description coverage, the description fully compensates by explaining all 5 parameters in detail. It provides clear semantics for query (search query string), limit (maximum results with default), from_year/to_year (search period with optional status), and media_type (type options with default and explanations of each option 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 searches for texts in a specific collection (National Library's digital collection) with a specific verb ('Search for'). It distinguishes from sibling tools like search_images by specifying text search, but doesn't explicitly differentiate from other text-related tools like find_concordances or word_concordance.
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 no guidance on when to use this tool versus alternatives. With multiple sibling tools like find_concordances, search_images, and word_concordance, there's no indication of when text search is appropriate versus other text analysis or image search tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
word_concordanceA
Find concordances with structured output (no HTML formatting).
Returns clean format with separate before/target/after fields instead of HTML-formatted text. This is useful for programmatic analysis where you need the matched word separated from context.
Args: urn: URN identifier for the document word: Word to find concordances for window: Number of words before and after the match (default: 12, max: 24) limit: Maximum number of concordances to return (default: 100)
Returns: JSON string containing structured concordance results with fields: - dhlabid: Document identifier - before: Text before the matched word - target: The matched word itself - after: Text after the matched word
| Name | Required | Description | Default |
|---|---|---|---|
| urn | Yes | ||
| word | Yes | ||
| window | No | ||
| limit | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
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 key behavioral traits: the tool returns structured JSON output (not HTML), includes default values for 'window' and 'limit', and specifies max constraints ('max: 24'). However, it does not cover potential errors, rate limits, or authentication needs, leaving some gaps in behavioral context.
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 appropriately sized and front-loaded, starting with the core purpose and key differentiator. Each sentence earns its place by explaining output format, usage context, parameters, and return values without redundancy. The structured bullet points for parameters and returns enhance readability without unnecessary verbosity.
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 moderate complexity (4 parameters, no annotations, but with an output schema), the description is complete enough. It covers purpose, usage, parameters, and return format in detail. Since an output schema exists, the description does not need to explain return values beyond what's provided, and it adequately addresses the lack of annotations and schema coverage.
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 0%, so the description must compensate fully. It adds significant meaning beyond the input schema by explaining each parameter's purpose: 'urn' as a 'URN identifier for the document', 'word' as 'Word to find concordances for', 'window' with default and max details, and 'limit' with default. This provides complete parameter semantics not present in the schema.
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 ('Find concordances') and resource ('structured output'), distinguishing it from siblings like 'find_concordances' by emphasizing 'structured output (no HTML formatting)' and 'clean format with separate before/target/after fields'. This explicit differentiation ensures the agent understands this tool's unique purpose.
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 this tool ('useful for programmatic analysis where you need the matched word separated from context'), but it does not explicitly state when not to use it or name alternatives among siblings (e.g., 'find_concordances' might offer HTML formatting). This gives good guidance but lacks explicit exclusions.
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. Dates show when Glama detected each change.
9 tool updates
- First observed
find_collocations - First observed
find_concordances - First observed
get_corpus_statistics - First observed
lookup_word_forms - First observed
lookup_word_lemma - First observed
ngram_frequencies - First observed
search_images - First observed
search_texts - First observed
word_concordance
TDQS
Most tools have distinct purposes, but find_concordances and word_concordance have significant overlap as both find concordances for words in documents, differing mainly in output format. This could cause confusion for an agent deciding which to use. Other tools like find_collocations, ngram_frequencies, and search functions are clearly differentiated.
All tool names follow a consistent snake_case pattern with clear verb_noun structure (e.g., find_collocations, lookup_word_forms, search_images). The naming is predictable and readable throughout the set, with no mixing of conventions or styles.
With 9 tools, this server is well-scoped for digital humanities text analysis. The count is appropriate, covering key operations like searching, concordancing, collocation analysis, and statistical queries without being overwhelming or too sparse for the domain.
The toolset covers core digital humanities workflows including text search, image search, concordancing, collocation analysis, and corpus statistics. Minor gaps exist, such as no direct document retrieval or metadata lookup tools, but agents can likely work around these using the provided search and analysis functions.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Multi-engine scholarly research server for search, traversal, full text, and reading lists.
Search biomedical papers, inspect publication records, and traverse citation or semantic graphs.
Search biomedical literature, get article details, find related articles, and explore MeSH terms
Norwegian transport (Entur) and geodata (Kartverket): trips, departures, addresses, elevation.
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables users to search and access digital collections from the Swedish National Archives (Riksarkivet) through multiple APIs. Supports searching records by keywords, exploring collections, and downloading historical images and documents.222Apache 2.0
- FlicenseNot gradedqualityDmaintenanceProvides access to Sweden's National Library (Kungliga biblioteket) open APIs, enabling search and retrieval of 20M+ bibliographic records, 10M+ cultural heritage objects, 2M+ research publications, and linked data through 52 tools across 10 endpoints.2-
- AlicenseAqualityCmaintenanceProvides programmatic access to the Directmedia Publishing 'Digitale Bibliothek' collection, a 1990s German electronic book library containing 101 volumes of classic literature and philosophy with text extraction, search, and navigation capabilities.9MIT
- AlicenseBqualityCmaintenanceEnables interaction with the Norwegian Business Registry (Brønnøysundregistrene) API to search and retrieve detailed information about Norwegian companies, subunits, roles, organization forms, municipalities, and NACE industry codes.1861MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/marksverdhei/dhlab-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server