Skip to main content
Glama
markonu

last-mile-mcp

by markonu

last-mile-mcp

tests

A reference MCP server for the part of an AI deployment that actually decides whether it survives: who is calling, what they may touch, and what must never happen without a human.

It is deliberately small and deliberately opinionated. The interesting content is not the tools — it is the four constraints they are built under, each of which was paid for in production.

1. An identified actor per call        actor.py
2. A named grant per tool              grants.py
3. A hard gate on irreversible actions gate.py
4. Connectors separated from business  connectors/ + domain/

Why this exists

Most AI pilots do not fail on the model. They fail on the last mile: the model has nothing real to act on, or it is given everything at once and the security review stops it. This repository is the smallest honest example of the middle ground — a model reaching live business objects, under constraints a reviewer can read in one sitting.

Related MCP server: enterprise-agent-lab

The four constraints

1. An identified actor per call

A shared MCP server has no single user. Every call runs on behalf of someone, and the identity lives in a ContextVar, not a module global — the server handles concurrent requests on one event loop, and a global leaks one caller's identity into another's tool call under load.

There is no anonymous fallback. current_actor() raises rather than returning a default. A server that answers without knowing who asked is a server whose audit trail is fiction.

In production, the actor is resolved from a signed assertion issued by the identity-aware proxy in front of the server, revalidated here rather than trusted — so a misconfigured route cannot silently become an open one. The bundled StaticHeaderResolver is for development only and fails closed on an unknown principal exactly like the real one.

2. A named grant per tool

One grant, declared at the tool, checked on every call:

@mcp.tool()
def customer_invoices(customer_id: str) -> list[dict[str, Any]]:
    require("billing.read")
    ...

Two rules make it work.

Fail closed. A missing grant is a refusal, never a degraded answer.

Refuse loudly. This is the one most implementations get wrong. A tool that quietly returns [] when the caller lacks permission teaches everyone downstream that the data does not exist — and a model reading that empty list will confidently tell a user their customer has no invoices. The refusal has to be legible:

Support desk service token does not hold the grant 'billing.read'. This is a permission refusal, not an empty result: the data may well exist.

A grant name that is not in the catalogue raises immediately, so a typo fails on the first call rather than silently authorising in production six weeks later.

3. A hard gate on irreversible actions

An agent may draft. Only a human sends.

Every action whose effect leaves the building stops at gate.py and becomes a draft in the requester's own queue. The tool result says so in words, so the model reports "I prepared it for you" rather than "I sent it".

This is a product decision, not a safety disclaimer. It is the reason non-technical staff trust a system like this enough to use it daily: nothing it does can embarrass them in front of a customer without their signature.

The line is not "writes are dangerous". open_ticket writes and executes directly, because a ticket nobody has sent anywhere can be closed again. prepare_invoice drafts, because an issued invoice reaches the customer and cannot be recalled. Draw that line explicitly, per action, and write down why.

4. Connectors separated from business logic

connectors/ knows how each external system authenticates, paginates and fails. Nothing above it does. When a vendor changes an API, the change lands in one file instead of in every tool that touched that system.

Connectors return domain objects, never raw vendor payloads. A vendor field name that leaks upward becomes a field name in a tool schema, then in the model's vocabulary, and then it is load bearing.

domain/service.py holds the joins and the rules. Tools stay thin: a rule that lives in a tool body is a rule the next tool will not know about.

Running it

python -m venv .venv && .venv/bin/pip install -e ".[dev]"
.venv/bin/python -m pytest          # 14 tests: the constraints, as tests
.venv/bin/lastmile-mcp              # stdio MCP server, 8 tools

Point any MCP client at it. whoami is the first tool to call — when someone reports that a tool "does not work", the first question is always which token they are on.

Three demo identities are wired in server.py, with deliberately different grant sets so refusals are easy to observe:

Principal

Grants

svc-support

crm.read, ticketing.read, ticketing.write

svc-account-manager

crm.read, ticketing.read, billing.read, billing.draft

svc-readonly

crm.read

One gotcha, written down so you don't rediscover it

server.py has no from __future__ import annotations. The server builds each tool's schema by introspecting real annotation objects; under PEP 563 they arrive as strings and the introspection fails on issubclass. It surfaces as an unrelated-looking type error at import time.

A second one, if you are porting code: this targets the MCP Python SDK 2.x, where FastMCP was renamed to MCPServer and Tool.inputSchema became Tool.input_schema. 1.x code imports mcp.server.fastmcp and fails here.

Scope

Fixtures instead of real systems, an in-memory draft queue, and a development actor resolver. Everything that would differ in a real deployment is behind an interface, and the constraints above are the part meant to be copied.

MIT. Written by Cédric Laurent.

Available Tools

8 tools
account_healthA

One joined view of a customer: contract, open tickets, overdue balance.

Needs both read grants. A caller holding only one gets a refusal rather than a half-answer, because a health summary missing its billing half reads as good news.

ParametersJSON Schema
NameRequiredDescriptionDefault
customer_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does disclose two key traits: it requires both read grants and returns a refusal rather than a partial answer if only one is held. It also explains the rationale for this design. It does not explicitly confirm read-only behavior, though 'view' and 'read grants' strongly imply it.

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

Conciseness5/5

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

Two sentences with the main purpose front-loaded in the first sentence and a concise behavioral rationale in the second. No filler or repetition.

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?

For a read-only health summary with one parameter and an output schema, the description covers the essential failure condition (missing read grant) and the tool's purpose. It omits explicit when-to-use guidance, but sibling context partially covers that. Overall it is adequate for a simple tool.

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

Parameters2/5

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

The schema only provides the name and type of customer_id with no description, and the tool description does not mention customer_id at all. The meaning is inferable from 'a customer,' but the description does not compensate for the 0% schema coverage by explaining expected format or semantics.

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

Purpose4/5

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

The description clearly identifies a joined view of a customer spanning contract, open tickets, and overdue balance, which distinguishes its intent from narrower sibling tools. It lacks an explicit verb like 'retrieve' and does not name sibling alternatives, so it stops short of full differentiation.

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

Usage Guidelines3/5

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

The description implies the tool is for obtaining an overall customer health summary, but it does not explicitly state when to choose it over find_customer, customer_tickets, or customer_invoices. No when-not or alternative routing is provided.

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

customer_invoicesC

Invoices for a customer with their payment state, newest first.

ParametersJSON Schema
NameRequiredDescriptionDefault
customer_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior1/5

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

No annotations are present, and the description gives no information about side effects, permissions, rate limits, or whether the operation is read-only. Without explicit disclosure, the agent has no way to know the behavioral expectations.

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

Conciseness5/5

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

The description is a single, concise sentence with no redundant words. It directly conveys the essential information without any fluff.

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

Completeness3/5

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

For a simple one-parameter retrieval tool, the description is adequate but not complete. It does not mention any additional context such as output format, pagination, or error handling. Given the simplicity, it meets the minimum requirement but lacks depth.

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

Parameters2/5

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

The input schema only includes customer_id with no description. The description adds minimal context by mentioning 'for a customer' but does not clarify the expected format, source, or any constraints for customer_id. The schema coverage is 0%, and the description fails to compensate meaningfully.

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 invoices for a customer, including payment state and ordering (newest first). This is specific enough to distinguish it from sibling tools like customer_tickets, which deals with tickets.

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?

The description does not provide any guidance on when to use this tool over alternatives. It does not mention specific use cases, comparisons with sibling tools, or any conditions that would make this tool the preferred choice.

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

customer_ticketsB

Service tickets for a customer, newest first.

ParametersJSON Schema
NameRequiredDescriptionDefault
open_onlyNo
customer_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. It does disclose the sorting behavior ('newest first'), which is useful. However, it doesn't state whether the operation is read-only, whether there are authentication requirements, rate limits, or side effects. The output schema exists, so return structure is covered elsewhere.

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

Conciseness5/5

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

A single, front-loaded sentence with zero redundancy. It states the core purpose and the key sorting behavior efficiently. Every word earns its place.

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

Completeness3/5

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

Given a simple listing tool with an output schema, the description covers the core idea. However, it omits critical usage context: what 'open_only' means, whether the default behavior is to filter to open tickets, and any pagination or limits. With no annotations, this leaves gaps for correct invocation.

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

Parameters2/5

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

Schema description coverage is 0%, and the description adds no meaning for either parameter. 'customer_id' is implied by 'for a customer' but not clarified (format, required). 'open_only' is entirely unexplained, despite having a default value in the schema. The description fails to compensate for the lack of schema descriptions.

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

Purpose4/5

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

The description states the resource ('Service tickets') and the scope ('for a customer') with a sorting detail ('newest first'). It distinguishes from siblings like customer_invoices (invoices vs tickets) and open_ticket (likely create), though it lacks an explicit verb like 'list' or 'retrieve'.

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 on when to use this tool versus alternatives such as open_ticket (likely for creation) or account_health. It doesn't mention prerequisites, filtering options, or any exclusions, leaving the agent to infer when this is the right choice.

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

find_customerB

Find customers by name or id. Returns id, name, sector, sites, contract.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the return fields but does not indicate whether the operation is read-only, what happens when no match is found, or any error behavior. The word 'find' implies a read operation, but that is not explicit, and no other behavioral context is given.

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

Conciseness5/5

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

The description is two short sentences with no redundant words. It front-loads the primary purpose and immediately follows with the return fields. It is appropriately sized for the tool's simplicity and wastes no space.

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?

Given that an output schema exists, the return fields are defined externally. The description covers the purpose, the query parameter's role, and the key output. Missing are any caveats (e.g., not-found behavior, permission requirements) and explicit usage guidance, but for a simple lookup tool, the core information is present. It falls short of a perfect score because it lacks any statement about read-only behavior or edge cases, which would be more important given the absence of annotations.

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?

The schema has a single 'query' string parameter with no description (0% coverage). The description adds the meaning that the query can be a name or an ID, which is helpful but minimal. It does not specify matching semantics (exact vs. partial, case sensitivity, etc.), so while it compensates partially, it leaves significant gaps.

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

Purpose4/5

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

The description states a clear action ('Find customers') and the resource (customers), with the search criteria ('by name or id') and the returned fields. It is specific and understandable, but it does not explicitly distinguish itself from sibling tools like customer_tickets or customer_invoices. The purpose is clear, though sibling differentiation is left implicit.

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?

The description provides no guidance on when to use this tool versus alternatives. It does not mention any prerequisites, exclusions, or conditions that would route an agent to a different tool. Given the sibling list, there is no explicit direction, leaving the agent to infer from the name alone.

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

my_draftsC

Everything this caller has prepared and not yet confirmed.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2/5.0
Behavior1/5

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

No annotations are present, so the description carries the full burden of behavioral disclosure. It does not state whether the operation is read-only, what data is returned, whether it is paginated, or any side effects. The description is far too minimal to inform an agent of the tool's behavior.

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 extremely short with no wasted words, which is concise. However, it lacks structure and front-loads a vague concept rather than a clear action. It is concise but not well-formed for usability.

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

Completeness1/5

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

Even with an output schema present, the description fails to convey the tool's core purpose or behavior. It does not clarify what 'prepared' means, what 'not yet confirmed' refers to, or how the output is structured. For a tool with no parameters, the description should clearly define the resource and operation, which it does not.

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?

The tool has zero parameters and an empty schema, so there is nothing to explain beyond what the schema already conveys. The description adds no parameter-specific meaning, but given the absence of parameters, a baseline of 4 is appropriate; there is no missing parameter information.

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

Purpose2/5

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

The description is a noun phrase ('Everything this caller has prepared and not yet confirmed') rather than a clear verb+resource statement. It does not specify the action (e.g., 'list', 'retrieve') or the exact type of drafts (tickets, invoices, etc.). It is vague and requires inference from context.

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

Usage Guidelines1/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 this tool versus alternatives. There is no mention of conditions, exclusions, or related sibling tools like customer_tickets or prepare_invoice.

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

open_ticketB

Open a service ticket. Internal and reversible, so it executes directly.

ParametersJSON Schema
NameRequiredDescriptionDefault
siteNo
titleYes
customer_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It adds a useful hint that the operation is 'internal and reversible' and 'executes directly', implying it is safe to run without confirmation. However, it doesn't explain side effects, permission requirements, or what 'internal' means, so transparency is partial.

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 concise—two short sentences with no redundancy. It front-loads the core purpose and adds a behavioral note, which is efficient. However, it is perhaps too terse, missing useful details, but it earns points for being well-structured and free of fluff.

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

Completeness2/5

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

For a tool with three parameters and an output schema, the description lacks essential context: what inputs are expected, what the output looks like, and any relationship to sibling tools like find_customer. It doesn't explain how to obtain a customer_id or what 'site' refers to, leaving significant gaps for an agent to call it correctly.

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

Parameters1/5

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

The description does not mention any parameters, and schema coverage is 0%, meaning the schema titles are the only clue. With two required parameters (customer_id and title) and an optional site, the agent has no explanation of their meanings or how to construct values. The description fails to compensate for the lack of schema descriptions.

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 verb 'Open' and the resource 'service ticket', which is specific and unambiguous. It distinguishes itself from sibling tools like prepare_invoice or customer_tickets by its unique action and object, so an agent can immediately understand its core function.

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 this tool versus alternatives, nor any prerequisites or context. For example, it doesn't mention that a customer must exist or that find_customer might be needed first. The description gives no exclusions or conditions, leaving the agent to infer usage.

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

prepare_invoiceA

Prepare an invoice. It is held as a draft and is NEVER issued by this server.

An issued invoice reaches the customer and cannot be recalled, so it is the canonical irreversible action: the tool prepares, a human issues.

ParametersJSON Schema
NameRequiredDescriptionDefault
amount_eurYes
customer_idYes
descriptionYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden, and it succeeds. It discloses the critical draft-only behavior, emphasizes the irreversible nature of issued invoices, and explicitly states the server never issues. This is substantial behavioral context beyond the schema.

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

Conciseness5/5

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

The description is short, front-loaded with the core action, and every sentence earns its place. The critical 'draft, NEVER issued' distinction appears immediately, and the second paragraph adds necessary context without fluff.

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?

For a simple three-parameter tool, the description covers the essential behavioral context and the irreversible-action boundary. An output schema exists, so return values need no explanation. It could be more complete by mentioning preconditions like an existing customer or how the draft is later accessed, but these are not critical for invoking the tool correctly.

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

Parameters2/5

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

Schema description coverage is 0%, and the description provides no parameter-level explanation. The parameter names are somewhat self-explanatory, but the description does not clarify expected formats, constraints, or relationships such as whether customer_id must be resolved via find_customer. The description fails to compensate for the missing schema descriptions.

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 names a specific verb and resource: 'Prepare an invoice.' It further differentiates itself from any issuing or listing tool by explicitly stating the result is 'held as a draft' and 'NEVER issued by this server,' which separates it from siblings like customer_invoices. This is a clear, distinct purpose.

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 provides clear context that this tool is for the preparatory draft step only, with the strong boundary 'the tool prepares, a human issues.' It implies when to use it and warns against expecting issuance, but it does not explicitly name an alternative tool or state when to choose a different sibling. Clear context, but no formal exclusions.

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

whoamiA

The identity and grants this call runs as.

Present in every deployment. When someone reports that a tool "does not work", the first question is which token they are on, and the answer should not require reading a database.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.6/5.0
Behavior3/5

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

The description implies a read-only operation by stating it reports identity and grants, but it does not explicitly declare the tool as non-mutating or safe. Since no annotations are provided, the description carries the full burden and falls short of full transparency.

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

Conciseness5/5

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

The description is concise, using only three sentences to convey purpose and usage. It is well-structured with no redundant information, earning a perfect score for efficiency.

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

Completeness5/5

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

For a tool with no parameters and a simple purpose, the description fully covers what an agent needs to know: what it returns, when to use it, and its universal availability. The output schema exists, so no further explanation of return values is required.

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

Parameters5/5

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

The tool has zero parameters, and the schema coverage is 100% by default. There is no additional parameter information needed, and the description correctly omits any parameter details, making it perfectly appropriate.

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?

Clearly states the tool returns the current identity and grants, which is specific and distinct from sibling tools like find_customer or open_ticket. The phrase 'identity and grants' unambiguously describes the resource being queried.

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

Usage Guidelines5/5

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

Provides explicit guidance on when to use the tool—when debugging why another tool fails, to check which token is being used. Also notes it is present in every deployment, giving context for availability.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 8 tool updatesv0.1.0
    • First observedaccount_health
    • First observedcustomer_invoices
    • First observedcustomer_tickets
    • First observedfind_customer
    • First observedmy_drafts
    • First observedopen_ticket
    • First observedprepare_invoice
    • First observedwhoami

TDQS

B3.2/5.0
Disambiguation5/5

Each tool serves a distinct purpose: customer lookup, ticket listing, invoice listing, combined health view, ticket creation, invoice draft creation, draft listing, and identity/grants. No two tools overlap in intent, and the descriptions clarify any potential ambiguity (e.g., account_health explicitly combines data from other tools).

Naming Consistency3/5

Naming mixes verb-first (find_customer, open_ticket, prepare_invoice) with noun-first (customer_tickets, customer_invoices, account_health) and possessive (my_drafts, whoami). The pattern is readable but not consistent, lacking a uniform verb_noun or resource_noun structure.

Tool Count5/5

8 tools is well-scoped for a customer service and billing domain. Each tool covers a core operation without unnecessary bloat, and the count feels neither thin nor overwhelming.

Completeness4/5

The surface covers customer lookup, ticket listing/creation, invoice listing/drafting, health summaries, and identity. Missing update/close actions for tickets or invoices, but these are intentionally excluded (e.g., invoice issuance is human-only), so the gaps are not fatal and agents can work within the design.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables controlled AI-agent access to enterprise-shaped tools with a deny-by-default gated write path, human approval, dry-run execution, and append-only audit logging.
    1
    -
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents to interact with application data as a specific user or agent while enforcing PostgreSQL Row Level Security, providing bounded tools for memory search, retrieval, and canonical mutation with an approval workflow.
    Apache 2.0
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP-compatible AI agents to safely act on business backends by enforcing per-agent permissions, autonomy thresholds, human approval with review-and-edit, and full audit trails.
    MIT

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/markonu/last-mile-mcp'

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