Skip to main content
Glama
littlebigbrains

@littlebigbrain/mcp

lbb_decode

Read-only

Identify the relation between two entities in a knowledge graph. Resolves types automatically and narrows candidates, using a model when multiple relations are possible. Use to fill edge labels, verify relationships, or build triples.

Instructions

Name the relation between two entities. The database narrows the candidates to the relations its type signatures admit for the (source type, target type) pair; if the pair admits exactly one, the database answers alone (mode: forced, no model call). Otherwise a small model fine-tuned on this graph's own edges picks from the narrowed set (mode: model_narrowed), constrained to real vocabulary so it can only emit a relation that can exist. You can OMIT the types — pass just the names and the database recovers each type by resolving the name to a real entity (echoed in resolved_source/resolved_target). Use it to fill a missing edge label, verify a relationship, or assemble structured triples. Returns the relation, the admissible candidates, and signature_forced.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
graphNoGraph to target; defaults to the connection's graph
branchNoBranch to target; defaults to the connection's branch
detailNoResponse detail level. Defaults to compact.
source_nameYesSource entity display name
source_typeNoSource entity type; omit to have the DB recover it from the name
target_nameYesTarget entity display name
target_typeNoTarget entity type; omit to have the DB recover it from the name
use_model_when_forcedNoCall the model even when the type pair forces one relation (default false — a forced pair is answered by the DB alone)
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses key behaviors: database narrowing, model invocation with constraints, and type recovery. Annotations declare readOnlyHint=true, and the description does not contradict this; it adds detail about the model's vocabulary constraint. No mention of side effects, which aligns with read-only nature.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is four sentences, front-loading the purpose. While informative, it contains some technical detail (e.g., 'mode: forced') that might be slightly dense. Every sentence earns its place, but it could be trimmed without losing clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the main return fields (relation, candidates, signature_forced) and explains the two modes. Without an output schema, this is sufficient for an agent to understand what the tool provides. However, it does not describe how the 'detail' parameter affects output, leaving a minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds meaning beyond the schema by explaining the interplay between source/target types and the optionality of providing them (e.g., 'omit to have the DB recover it from the name'). It also describes the 'use_model_when_forced' parameter's effect. This adds integration context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description starts with a specific verb and resource: 'Name the relation between two entities.' It further clarifies its use cases: 'fill a missing edge label, verify a relationship, or assemble structured triples.' This clearly distinguishes it from siblings like lbb_query or lbb_search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains the two modes (forced vs model_narrowed) and when to omit types. It provides clear context for usage: to fill edge labels or verify relationships. However, it does not explicitly state when not to use it or name alternatives, though the sibling list implies distinction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/littlebigbrains/lbb-mcp'

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