Skip to main content
Glama

lookup_word_forms

Find different grammatical forms of Norwegian words using the National Library of Norway's Digital Humanities Lab resources for linguistic analysis and research.

Instructions

Look up different forms of a Norwegian word.

Args: word: The word to look up

Returns: JSON string containing different word forms

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wordYes

Implementation Reference

  • The handler function decorated with @mcp.tool(), implementing the lookup_word_forms tool. It takes a word, uses dhlab.WordForm to retrieve different forms, and returns them as JSON or an error message.
    @mcp.tool() def lookup_word_forms(word: str) -> str: """Look up different forms of a Norwegian word. Args: word: The word to look up Returns: JSON string containing different word forms """ try: word_form = dhlab.WordForm(word) if hasattr(word_form, 'forms') and word_form.forms is not None: return word_form.forms.to_json(orient='records', force_ascii=False) return f"No forms found for word: {word}" except Exception as e: return f"Error looking up word forms: {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