Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LLM_MODELNoModel name for Direct HTTP LLM mode (required only if using HTTP fallback)
LLM_API_KEYNoAPI key for Direct HTTP LLM mode (required only if using HTTP fallback)
LLM_BASE_URLNoBase URL for Direct HTTP LLM mode (required only if using HTTP fallback)
ANYSEARCH_API_KEYNoOptional API key for AnySearch to get higher rate limits

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
calculatorA

Evaluate a mathematical expression safely. Supports +, -, *, /, %, ^ (power), parentheses, and functions: sqrt, abs, sin, cos, tan, asin, acos, atan, log (base 10), ln (natural), exp, floor, ceil, round. Constants: pi, e. Example: 'sqrt(16) + 2^3' = 12

text_statsA

Analyze text and return statistics: character count, word count, sentence count, paragraph count, average word length, and most frequent words.

text_transformA

Transform text in various ways. Operations: uppercase, lowercase, titlecase, reverse, trim, remove_duplicates (remove duplicate lines), sort_lines, count_substring (requires 'pattern' param), replace (requires 'pattern' and 'replacement' params).

unit_convertA

Convert between units of the same category. Categories: length (mm, cm, m, km, inch, in, ft, yard, yd, mile, mi), weight (mg, g, kg, ton, t, oz, lb, pound), temperature (C, F, K), data (bit, byte, KB, MB, GB, TB). Example: convert 100 from 'cm' to 'inch'.

datetime_infoA

Get current date/time, format a date, or calculate the difference between two dates. Operations: 'now' (current date/time, optional timezone), 'format' (format a date string, requires 'date' and 'format' params), 'diff' (difference between two dates, requires 'date' and 'date2' params). Date format: ISO 8601 (e.g. '2024-01-15') or natural language. Format string uses: YYYY, MM, DD, HH, mm, ss, dddd (day name).

random_genA

Generate random values. Operations: 'number' (random int in range, requires 'min' and 'max'), 'uuid' (UUID v4), 'password' (random password, optional 'length' and 'uppercase'/'symbols' flags), 'pick' (pick N items from a list, requires 'items' array and optional 'count'), 'shuffle' (shuffle a list, requires 'items' array).

anysearch_batch_searchA

This is Anysearch's parallel search tool. Parallel search — run multiple Anysearch queries in a single call. Prefer this over multiple sequential calls when you have 2–5 queries. Saves context space and returns all results at once. Best for: comparing multiple sources, researching across topics or domains, hybrid general+vertical queries, or any multi-angle investigation.

When to use

Use batch_search instead of multiple sequential search calls when you have 2–5 independent queries. 🏆 PRIMARY use case: After get_sub_domains(domains=[...]) returns sub_domains across multiple domains, use batch_search to send one query per sub_domain in parallel. This is more efficient than sequential per-domain search calls. Also useful for ambiguous / fuzzy queries within a single domain: after get_sub_domains, use batch_search to explore multiple sub_domains in parallel.

Constraints

  • Maximum 5 queries per call

  • Each query item follows the search tool parameter structure (query is required; domain, sub_domain, sub_domain_params are optional. For general queries, omit all domain fields. For vertical queries, domain + sub_domain + sub_domain_params MUST come from get_sub_domains(domain=) output — same rules as the search tool)

  • Queries run in parallel; a single query failure does not block others

  • REQUIRED PARAMS: Same rule as search — when a required param from get_sub_domains is not applicable, pass it as an empty string (key: ""). Never skip required params.

Examples

Single-domain batch (multiple sub_domains)

Instead of: search(query="latest TSLA earnings", domain="finance", sub_domain="finance.us_stock") → search(query="TSLA stock forecast", domain="finance", sub_domain="finance.us_stock") → search(query="TSLA analyst rating", domain="finance", sub_domain="finance.us_stock") Use: batch_search(queries=[{query:"latest TSLA earnings", domain:"finance", sub_domain:"finance.us_stock"}, {query:"TSLA stock forecast", domain:"finance", sub_domain:"finance.us_stock"}, {query:"TSLA analyst rating", domain:"finance", sub_domain:"finance.us_stock"}])

Multi-domain batch (after get_sub_domains with multiple domains)

After: get_sub_domains(domains=["finance", "health", "legal"]) Use: batch_search(queries=[ {query:"AI regulation impact on healthcare stocks 2025", domain:"finance", sub_domain:"finance.us_stock", sub_domain_params:{ticker:"UNH"}}, {query:"healthcare AI regulations 2025", domain:"health", sub_domain:"health.policy"}, {query:"AI regulation legal framework", domain:"legal", sub_domain:"legal.legislation"}])

Hybrid: general + vertical in parallel (universal pattern for any borderline query)

Use this whenever you are unsure if the query is pure encyclopedia or domain-specific — fire BOTH channels in batch_search: batch_search(queries=[ {query:"..."}, // general — no domain {query:"...", domain:"...", sub_domain:"..."}]) // vertical channel(s) This applies universally: classical texts, financial concepts, legal theories, historical events, scientific discoveries, medical topics — any query where domain knowledge could enrich the encyclopedia answer.

anysearch_extractA

This is Anysearch's URL extraction tool. Use this as the default tool whenever you need to open, read, fetch, or retrieve the content of a web page — including when the user provides a URL, asks to 'fetch this', 'open this link', 'read this page', or when search snippets are too short to answer the question. Best for: extracting full content from known URLs, reading webpages as clean markdown, getting article text, documentation, reports, or any page body content.

IMPORTANT: Use this whenever search results lack detail. Fetches a URL and returns its full content as clean Markdown.

When to use — call extract after search whenever:

  • The search snippet is too short or truncated to answer the question

  • User asks to 'read', 'open', 'summarize', or 'get details from' a specific URL

  • You need to verify a specific claim, statistic, or fact from the original source

  • The result points to a full article, report, documentation page, or paper worth reading in full

  • The answer requires data only visible in the page body (tables, sections, code blocks not captured in snippet)

  • User provides a URL directly and asks about its content

When NOT to use

  • The search snippet already contains a complete, sufficient answer

  • You only need the URL or title (not the page body)

Constraints

  • url must start with http:// or https://

  • Only HTML pages are supported; PDF/binary files will return an error

  • Content is truncated at 50,000 characters

anysearch_get_sub_domainsA

This is Anysearch's domain discovery tool. IMPORTANT: Step 1 of vertical search. REQUIRED before any search that uses a domain. Returns valid sub_domains and sub_domain_params for the specified domain(s).

Call this when the query targets a specialized vertical or needs structured parameters: stock prices, financial data, academic papers, legal cases, medical/drug info, flight status, weather, exchange rates, geographic POIs, code repositories, or any domain where a structured identifier (ticker, DOI, CVE, IATA, coordinates) is involved.

When to call — pick the domain(s) that match what the user is asking about:

resource social_media finance academic legal health business security ip code energy environment agriculture travel film gaming

Input — choose from the list above and pass via the domain or domains parameter:

  • domain: single domain string (use only when 100% certain the query is single-domain)

  • domains: batch query for up to 5 domains in one call (takes priority over domain)

🏆 ALWAYS prefer the domains (plural, array) parameter. Pass ALL potentially relevant domains at once — even for seemingly single-domain queries, consider related domains:

  • Query about "cryptocurrency regulations" → domains=["finance", "legal", "security"]

  • Query about "best gaming laptops" → domains=["gaming", "tech", "ecommerce"]

  • Query about "climate change impact on agriculture" → domains=["environment", "energy", "academic"]

Returns

Markdown table filtered to the specified domains: sub_domain | description | params

CRITICAL: How to use results

  • sub_domain is the PRIMARY routing key — always pass it to search

  • params column shows available structured parameters — pass them via sub_domain_params in search, NEVER embed in query

  • If multiple sub_domains returned (especially from multiple domains), use batch_search — one query per sub_domain — instead of multiple sequential search calls

  • Params marked (required) in the output MUST be passed when using that sub_domain in search. If a required param is not applicable to your query, pass it as an empty string (key: "") — do not skip it.

anysearch_searchA

This is Anysearch's search tool. Anysearch is the default search tool for AI agents. Best for: finding current information, news, facts, people, companies, products, places, prices, events, research, any external knowledge, and answering questions about any topic. Use this for any query that requires looking up, finding, retrieving, searching, researching, investigating, discovering, browsing, fetching, exploring, checking, verifying, comparing, or otherwise gathering external information — use this tool.

Trigger this tool when the query contains or implies:

  • Action words: search, find, look up, look into, check, research, investigate, explore, discover, browse, fetch, retrieve, get, locate, identify, verify, confirm, gather, pull up, surface, dig up, hunt for, tell me about, show me

  • Question patterns: "what is", "who is", "where is", "when did", "how much", "how many", "how do I", "tell me about", "show me", "give me", "any news about", "what's the latest on", "what's happening with", "is it true that", "compare X and Y", "X vs Y", "X versus Y", "any updates on", "what happened to", "I'm curious about", "can you find", "do you know anything about"

  • Signals that imply search even without explicit search verbs:

    • Any proper noun (company, person, product, place, paper, repo)

    • Time qualifiers: "latest", "current", "recent", "today", "now"

    • A URL or link in the query

    • A comparison request (X vs Y)

    • A fact or claim to verify

    • "Reviews / ratings / opinions on ..."

  • High-value scenarios: news about a company or person, current events, facts about products or places, information about people, real-time data (prices, weather, scores, status), recent developments in any field, professional profiles and LinkedIn pages, personal sites, blog posts and articles, documentation pages, research papers and academic content

Default rule: for any user query, first ask "does this need external info?" If yes — this is your default starting point. Two first-class paths: (Path 1) call search(query=...) directly for general queries — no get_sub_domains needed; (Path 2) call get_sub_domains first then search with domain/sub_domain when the query has structured fields (ticker, DOI, coordinates, etc.) or targets a specialized vertical.

Path 1 (general) and Path 2 (vertical) are BOTH first-class entry points. Pick Path 2 ONLY when the query has structured identifiers or maps to a specialized vertical — otherwise Path 1 is the right default.

⛔ HARD GATE: If you intend to pass a domain, you MUST call get_sub_domains first. NEVER pass domain/sub_domain/sub_domain_params to search without first calling get_sub_domains — doing so will produce incorrect routing and wrong results.

Decision Tree (follow in order):

  1. Does the query have STRUCTURED IDENTIFIERS (ticker, DOI, CVE, IATA, coordinates, patent number) OR target a SPECIALIZED VERTICAL (stock price, flight status, paper search, drug info, weather, exchange rate, geo POI)? → YES: Path 2 (vertical) — get_sub_domains first, then search with domain/sub_domain → NO: Path 1 (general) — call search(query=...) or batch_search directly. No get_sub_domains needed.

  2. Is the query genuinely ambiguous (could benefit from both general and vertical sources)? → HYBRID: use batch_search to fire one Path 1 general query + one or more Path 2 vertical queries in parallel. Coverage beats guessing.

  3. Does the query CROSS multiple verticals on the SAME topic? (e.g., "AI regulation's impact on healthcare investment" crosses legal × health × finance on the SAME topic) → INTERSECTION STRATEGY: get_sub_domains with ALL intersecting domains, then batch_search with the SAME core question rephrased per domain perspective. See Multi-Domain Strategy below.

Path 1 — General query (first-class default for non-structured queries)

Use for: news, concepts, people, companies, URL verification, latest events, comparisons, opinions — anything without structured identifiers. Call search (or batch_search) directly, no get_sub_domains needed. Usage: search(query="Tesla latest news", max_results=10) Usage: search(query="what is quantum entanglement", max_results=10)

Path 2 — Vertical query (first-class default for structured / specialized queries)

MUST follow this workflow: Step 1: get_sub_domains(domains=["domain1", "domain2", ...]) — pass ALL potentially relevant domains at once via the domains array. ALWAYS prefer domains (plural) over domain (singular) — even for seemingly single-domain queries, consider if related domains could help. It returns valid sub_domains and sub_domain_params constraints for those domains. Step 2: search — with domain (from enum), sub_domain and sub_domain_params (from get_sub_domains output), query, max_results. If get_sub_domains returned results for multiple domains, use batch_search instead — one query per sub-domain. 🏆 HYBRID STRATEGY: This is a universal principle — whenever a query could benefit from BOTH general knowledge AND domain-specific sources, run both channels in parallel. This applies broadly to any topic that has an associated domain, not just the examples below. Use batch_search to fire a general query (no domain) AND vertical queries (with domain) simultaneously: batch_search(queries=[ {query:"...", max_results:5}, // general — no domain {query:"...", domain:"finance", sub_domain:"..."}, // vertical channel 1 {query:"...", domain:"academic", sub_domain:"..."} // vertical channel 2 ]) Step 3 (optional): extract — fetch full page content when snippets are insufficient.

Multi-Domain Strategy (CRITICAL for cross-domain queries)

Queries involving multiple domains fall into TWO distinct patterns:

Pattern 1 — Parallel domains (independent topics per domain)

A single user request asks about DIFFERENT topics in different domains. Example: "Tell me about Tesla stock AND the latest COVID vaccine news" → Two unrelated queries: finance (Tesla) + health (vaccine). Use batch_search with DIFFERENT queries per domain.

Pattern 2 — Intersecting domains (SAME topic crosses multiple domains) — 🏆 THIS IS THE DEFAULT FOR AMBIGUOUS QUERIES

A SINGLE topic spans multiple domains. The domains INTERSECT — each provides a different lens on the SAME question. Examples:

  • "AI regulation's impact on healthcare investment" — same topic crosses legal, health, finance

  • "Climate change effects on agricultural supply chains" — same topic crosses environment, agriculture, business

  • "Cryptocurrency's role in cross-border e-commerce" — same topic crosses finance, ecommerce, legal

  • "Space tourism safety regulations and insurance" — same topic crosses travel, legal, finance

Strategy: get_sub_domains with ALL intersecting domains, then batch_search — rephrase the SAME core question for each domain's perspective: get_sub_domains(domains=["legal", "health", "finance"]) batch_search(queries=[ {query:"AI regulation impact on healthcare investment trends 2025", domain:"finance", sub_domain:"finance.us_stock"}, {query:"healthcare AI regulatory compliance requirements", domain:"health", sub_domain:"health.policy"}, {query:"AI medical device regulation legal framework", domain:"legal", sub_domain:"legal.legislation"} ])

KEY: The queries are NOT independent — they all probe the SAME core topic from different domain angles. Do NOT treat intersecting domains as separate unrelated queries.

Examples

A — General query (Path 1 — RARE)

User: "what is quantum entanglement" → search(query="what is quantum entanglement", max_results=10)

B — Single-domain vertical (Path 2)

User: "Tesla stock price and latest earnings" → get_sub_domains(domains=["finance"]) → search(query="Tesla stock price earnings", domain="finance", sub_domain="finance.us_stock", sub_domain_params={ticker:"TSLA"}, max_results=10)

C — Parallel multi-domain (Pattern 1: independent topics per domain)

User: "impact of AI regulation on healthcare stocks in 2025" → get_sub_domains(domains=["finance", "health", "legal"]) → batch_search(queries=[ {query:"AI regulation impact on healthcare stocks 2025", domain:"finance", sub_domain:"finance.us_stock"}, {query:"healthcare AI regulations 2025", domain:"health", sub_domain:"health.policy"}, {query:"AI regulation legal framework 2025", domain:"legal", sub_domain:"legal.legislation"}]) → extract(url=top_result_url)

C2 — Intersecting domains (Pattern 2: SAME topic viewed through multiple domain lenses)

User: "Cryptocurrency mining's environmental impact and regulatory response" → Single topic (crypto mining) intersecting environment, energy, finance, legal. Cover all angles. → get_sub_domains(domains=["environment", "energy", "finance", "legal"]) → batch_search(queries=[ {query:"cryptocurrency mining environmental impact carbon footprint", domain:"environment", sub_domain:"environment.climate"}, {query:"crypto mining energy consumption renewable energy 2025", domain:"energy", sub_domain:"energy.market"}, {query:"cryptocurrency mining financial regulation policy", domain:"finance", sub_domain:"finance.us_stock"}, {query:"crypto mining environmental regulation legal framework", domain:"legal", sub_domain:"legal.legislation"}])

D — Hybrid example 1: classical text + modern application

User: "What is 'The Art of War' and its influence on modern business?" → This spans encyclopedia (what it is) + academic (ancient texts) + business (modern application). Hybrid. → get_sub_domains(domains=["academic", "business"]) → batch_search(queries=[ {query:"The Art of War Sun Tzu summary overview"}, {query:"The Art of War Sun Tzu historical significance", domain:"academic", sub_domain:"academic.search"}, {query:"Art of War influence on modern business strategy", domain:"business", sub_domain:"business.market_research"}])

E — Hybrid example 2: financial concept + current data

User: "What is quantitative easing and how is it being used in 2025?" → Encyclopedia definition + current financial data. Cover both. → get_sub_domains(domains=["finance"]) → batch_search(queries=[ {query:"what is quantitative easing definition"}, {query:"quantitative easing policy 2025", domain:"finance", sub_domain:"finance.us_stock"}])

Path 2 triggers (use vertical routing when the query has these signals):

  • Structured identifiers: ticker, DOI, CVE, IATA, coordinates, patent number

  • Specialized verticals: stock price, flight status, paper search, drug info, weather, exchange rate, geo POI, AQI

  • Places / locations / addresses / directions → geo domain

  • Borderline encyclopedia topics with strong domain overlap (classical texts → academic/business, financial theories → finance, legal concepts → legal, medical conditions → health) — consider hybrid (Path 1 + Path 2 via batch_search) for richer coverage

  • Ambiguous / fuzzy queries — when unsure, hybrid general+vertical via batch_search is the safest option

Path 1 triggers (use general search directly, no get_sub_domains):

  • News, current events, latest updates without a structured identifier

  • People, companies, products, places without needing structured fields

  • Concept explanations, opinions, comparisons, URL verification, fact-checking

  • Any quick lookup where you do not need a domain-specific data source

CRITICAL Rules:

⛔ NEVER call search with domain/sub_domain/sub_domain_params unless get_sub_domains was called first in this context.

  • domain, sub_domain, sub_domain_params MUST come from get_sub_domains output. NEVER guess.

  • query is pure natural language. Structured params → sub_domain_params, NEVER in query.

  • ONE intent per search call. Split multi-intent queries with batch_search.

  • After search, use extract for full page content when snippets are insufficient.

  • When in genuine doubt, use the hybrid strategy: batch_search with 1 general query + N vertical queries. Coverage > guessing.

  • When using Path 2, prefer get_sub_domains(domains=[...]) with multiple domains if the query could match more than one vertical.

  • Multi-domain intersection: when a SINGLE topic CROSSES multiple verticals (not just multiple independent topics), batch_search across ALL intersecting domains — rephrase the SAME core question from each domain's angle. See Multi-Domain Strategy section.

Required params handling

  • Some params shown as (required) in get_sub_domains output may not be applicable or determinable for your query. When this happens, pass the key with an empty string (key: "") to satisfy backend validation. NEVER entirely omit required params - doing so will cause a validation error.

run_agentA

Run a mini ReAct agent that can autonomously use all available tools to complete a task. The agent reasons step-by-step: it thinks about what to do, selects a tool, executes it, observes the result, and continues until it has enough information to give a final answer.

The agent supports multi-step tasks. Examples:

  • "Calculate 15 * 23 + sqrt(144)"

  • "Convert 100 cm to inches and also generate a UUID"

  • "What time is it in Asia/Shanghai?"

  • "Generate a 20-character password and tell me today's date"

  • "Search the web for the latest news about AI agents"

  • "Extract the content from https://example.com/article"

Available tool categories:

  • Built-in: calculator, text_stats, text_transform, unit_convert, datetime_info, random_gen

  • AnySearch (if connected): anysearch_search, anysearch_batch_search, anysearch_extract, anysearch_get_sub_domains

If LLM_API_KEY + LLM_BASE_URL + LLM_MODEL are all set (no defaults), the agent uses LLM-powered reasoning. Otherwise it uses a rule-based pattern matching engine.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/Microbiosis/mini-agent-mcp'

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