Skip to main content
Glama

get_longest_common_subsequence

Compute the length of the longest common subsequence between two strings, enabling sequence alignment and similarity analysis for text comparison tasks.

Instructions

Length of longest common subsequence (LCS) between two strings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
s1Yes
s2Yes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are present, so the description must disclose behavioral traits. It only states the output is a length, omitting details like case sensitivity, whitespace handling, what constitutes a subsequence, or computational complexity. This is insufficient for a tool with no annotation support.

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 a single concise sentence with no wasted words. It could be slightly expanded to include key behavioral details without losing conciseness, but as is, it is efficient.

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 tool is simple with two string inputs and an integer output. An output schema exists (context signal), so the description does not need to explain return values. The only missing piece is behavioral details like case sensitivity, but overall the description is nearly complete for a basic tool.

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

Parameters3/5

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 identifies the two parameters as strings and implies they are the input strings for LCS, adding basic meaning. However, it does not specify any constraints or formatting expectations, so it only partially compensates.

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 clearly states the tool returns the length of the longest common subsequence between two strings. The verb 'get' and resource 'longest common subsequence' are specific and distinct from sibling tools like get_edit_distance or get_cosine_similarity.

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

Usage Guidelines2/5

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

No guidance is provided on when to use LCS versus alternatives such as edit distance, cosine similarity, or Jaccard similarity. The description gives no context for appropriate use cases or exclusions.

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/BlackMount-ai/blackmount-nlp-mcp'

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