Skip to main content
Glama
dfine-io

dfine-semantic

Official
by dfine-io

Semantic code search

semantic_search
Read-onlyIdempotent

Find code by meaning in an indexed project. Ask one natural-language sentence, not keywords, to get ranked file:line references.

Instructions

Find code by meaning in an indexed project. Ask one full natural-language sentence, not keywords. Good: "How does the app validate share token permissions?" Bad: "shareToken auth validate". Returns file:line references by default - read the files you need. Searches .ts and .tsx unless include adds other indexed extensions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoAbsolute project root - omit to use the working directory
limitNoMax results
queryYesOne natural-language sentence
includeNoExtra indexed extensions to search, e.g. [".md", ".css"]
thresholdNoMin similarity - raise to 0.5 for precision, lower for recall
returnFullContentNoReturn chunk code instead of file:line references - keep limit under 20

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
notesYesSync, index and limit notes
statusYes"not_indexed": run index_project for this path first
hasMoreYesMore matches pass the threshold
resultsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.4

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and closed-world, so the safety profile is covered. The description adds real behavioral context beyond that: results default to file:line references, the caller should then read the files, and only .ts/.tsx are searched unless include adds extensions. Minor gap: nothing about result ordering or the effect of threshold on output volume.

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?

Five short lines, front-loaded with the core purpose, then query style, then return-format and scope defaults. The good/bad examples earn their place by making the query convention unambiguous; there is no filler.

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?

With an output schema present, return values need not be described, and the description still usefully notes the default reference format. It covers query style, default extensions, and the read-the-files follow-up. It is slightly thin on how limit and threshold interact with the returned set.

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 100%, so every parameter is already documented, and the baseline is 3. The description largely restates schema content (natural-language sentence, include for extra extensions, file:line default) and adds only the query-phrasing examples; threshold and path receive no additional meaning.

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?

States a specific verb and resource — 'Find code by meaning in an indexed project' — and scopes it to an indexed project, which cleanly separates it from the indexing siblings (index_project, index_status) and from find_duplicates. An agent can tell what it retrieves without opening the schema.

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?

Gives concrete invocation guidance: 'Ask one full natural-language sentence, not keywords,' with a good and a bad example, plus the default extension scope and how include extends it. It lacks an explicit when-not-to-use or a direct pointer to a sibling alternative, so it stops short of a 5.

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