Skip to main content
Glama

lookup_word_lemma

Find the base form of Norwegian words using the National Library of Norway's digital collections. Input a word to receive its lemma information in JSON format.

Instructions

Look up the lemma (base form) of a Norwegian word.

Args: word: The word to look up

Returns: JSON string containing lemma information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wordYes

Implementation Reference

  • The handler function for the lookup_word_lemma tool. It takes a word as input, uses dhlab.WordLemma to retrieve lemma information, and returns it as JSON or an error message.
    @mcp.tool() def lookup_word_lemma(word: str) -> str: """Look up the lemma (base form) of a Norwegian word. Args: word: The word to look up Returns: JSON string containing lemma information """ try: word_lemma = dhlab.WordLemma(word) if hasattr(word_lemma, 'lemmas') and word_lemma.lemmas is not None: return word_lemma.lemmas.to_json(orient='records', force_ascii=False) return f"No lemma found for word: {word}" except Exception as e: return f"Error looking up word lemma: {str(e)}"

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/marksverdhei/dhlab-mcp'

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