MCPcopy Create free account

hub / github.com/Exorust/Adkit-MCP / functions

Functions155 in github.com/Exorust/Adkit-MCP

↓ 24 callersMethodmatch
(self, request: MatchRequest)
src/ad_injector/services/match_service.py:50
↓ 22 callersFunction_simple_request
(**overrides)
tests/test_match_service.py:106
↓ 21 callersFunction_build_service
(hits: list[VectorHit] | None = None)
tests/test_match_service.py:95
↓ 17 callersFunction_make_hit
Build a VectorHit matching the port's return type.
tests/test_match_service.py:35
↓ 11 callersMethod_get_client
(self)
src/ad_injector/adapters/qdrant_vector_store.py:39
↓ 10 callersFunction_make_hit
( ad_id: str, score: float, *, sensitive: bool = False, age_restricted: bool = False,
tests/test_policy_engine.py:10
↓ 8 callersFunction_build_filter
(**constraint_kwargs)
tests/test_targeting_engine.py:10
↓ 8 callersMethodapply
Return only hits that pass all policy checks.
src/ad_injector/domain/policy_engine.py:31
↓ 8 callersFunctionget_settings
Return the singleton RuntimeSettings (cached after first call).
src/ad_injector/config/runtime.py:70
↓ 8 callersFunctionrequire_admin_scope
Require admin scope for Control Plane. Raises PermissionError if not allowed.
src/ad_injector/mcp/auth.py:8
↓ 7 callersFunction_get_index_service
()
src/ad_injector/mcp/tools.py:85
↓ 6 callersFunctioncreate_server
Build and return a configured FastMCP server. Args: mode: ``"data"`` for the Data Plane (LLM-facing, read-only) or ``"admin
src/ad_injector/mcp/server.py:19
↓ 3 callersMethod_ad_id_to_uuid
(self, ad_id: str)
src/ad_injector/adapters/qdrant_vector_store.py:48
↓ 3 callersFunction_get_tool_names
Extract registered tool names from a FastMCP server.
tests/test_data_plane_tools.py:29
↓ 3 callersFunctionbuild_index_service
Construct an IndexService with real adapters.
src/ad_injector/wiring.py:26
↓ 3 callersMethodcollection_info
(self)
src/ad_injector/ports/vector_store.py:40
↓ 2 callersMethod_blocked_keywords_intersect
True if ad.blocked_keywords intersects context_text tokens (substring or exact).
src/ad_injector/domain/policy_engine.py:77
↓ 2 callersMethod_get_model
(self)
src/ad_injector/adapters/fastembed_provider.py:17
↓ 2 callersMethod_translate_condition
(f: FieldFilter)
src/ad_injector/adapters/qdrant_vector_store.py:286
↓ 2 callersMethodbuild_filter
( self, constraints: MatchConstraints, placement: PlacementContext, )
src/ad_injector/domain/targeting_engine.py:22
↓ 2 callersFunctionbuild_match_service
Construct a MatchService with real adapters.
src/ad_injector/wiring.py:17
↓ 2 callersFunctioncheck_scope
Check scope for the given server mode. Call at server start or per-request.
src/ad_injector/mcp/auth.py:30
↓ 2 callersMethodembed
(self, text: str)
src/ad_injector/ports/embedding.py:12
↓ 2 callersMethodembed
(self, text: str)
src/ad_injector/adapters/fastembed_provider.py:22
↓ 2 callersMethodensure_collection
(self, dimension: int)
src/ad_injector/ports/vector_store.py:36
↓ 2 callersMethodupsert_ads
(self, ads: list[Ad])
src/ad_injector/services/index_service.py:50
↓ 1 callersMethod_allowed
( self, hit: VectorHit, constraints: MatchConstraints, context_text: str,
src/ad_injector/domain/policy_engine.py:62
↓ 1 callersMethod_ensure_enabled_filter
Merge in must_not enabled=False so only enabled ads are returned.
src/ad_injector/adapters/qdrant_vector_store.py:256
↓ 1 callersMethod_filter_spec_to_qdrant
Convert simple dict filter (e.g. advertiser_id, ad_id) to Qdrant Filter.
src/ad_injector/adapters/qdrant_vector_store.py:264
↓ 1 callersMethod_get_collection_meta
(self)
src/ad_injector/adapters/qdrant_vector_store.py:142
↓ 1 callersFunction_get_match_service
()
src/ad_injector/mcp/tools.py:80
↓ 1 callersMethod_hit_to_candidate
(self, hit: VectorHit, request_id: str)
src/ad_injector/services/match_service.py:135
↓ 1 callersMethod_set_collection_meta
( self, dimension: int, embedding_model_id: str, schema_version: str, )
src/ad_injector/adapters/qdrant_vector_store.py:159
↓ 1 callersFunction_shape_ads_get
(payload: dict | None)
src/ad_injector/mcp/tools.py:61
↓ 1 callersFunction_shape_collection_ensure
(d: dict)
src/ad_injector/mcp/tools.py:57
↓ 1 callersFunction_shape_collection_info
(d: dict)
src/ad_injector/mcp/tools.py:53
↓ 1 callersFunction_shape_match_response
Return only allowed fields for ads.match response.
src/ad_injector/mcp/tools.py:41
↓ 1 callersFunction_store_trace_for_explain
Store audit trace keyed by each match_id for ads.explain.
src/ad_injector/mcp/tools.py:67
↓ 1 callersFunction_tokenize_context
Deterministic tokenization: split on whitespace, lowercase.
src/ad_injector/domain/policy_engine.py:17
↓ 1 callersMethod_translate_filter
(vf: VectorFilter)
src/ad_injector/adapters/qdrant_vector_store.py:277
↓ 1 callersMethodbulk_disable
(self, filter_spec: dict)
src/ad_injector/ports/vector_store.py:50
↓ 1 callersMethoddelete_ad
(self, ad_id: str)
src/ad_injector/ports/vector_store.py:46
↓ 1 callersMethoddelete_collection
(self)
src/ad_injector/ports/vector_store.py:38
↓ 1 callersMethodget_ad
(self, ad_id: str)
src/ad_injector/ports/vector_store.py:48
↓ 1 callersFunctionload_ads_from_file
Load ads from a JSON file. Raises on missing file or invalid JSON/schema.
src/ad_injector/cli.py:15
↓ 1 callersFunctionlog_tool_invocation
Emit structured log and update metrics stub.
src/ad_injector/mcp/observability.py:19
↓ 1 callersFunctionmain
()
src/ad_injector/cli.py:46
↓ 1 callersFunctionmain
()
src/ad_injector/main_control.py:18
↓ 1 callersFunctionmain
Main function for the ad-injector MCP server.
src/ad_injector/main.py:6
↓ 1 callersFunctionmain
()
src/ad_injector/main_runtime.py:18
↓ 1 callersMethodnew_match_id
(self, request_id: str, ad_id: str)
src/ad_injector/ports/id_gen.py:20
↓ 1 callersMethodnew_request_id
(self)
src/ad_injector/ports/id_gen.py:13
↓ 1 callersMethodquery
( self, vector: list[float], vector_filter: VectorFilter, top_k: int, )
src/ad_injector/ports/vector_store.py:27
↓ 1 callersMethodreason
Return audit reason for this hit: 'allowed' or 'denied: <reason>'.
src/ad_injector/domain/policy_engine.py:45
↓ 1 callersFunctionregister_control_plane_tools
Register Control Plane (admin) tools with response allowlists.
src/ad_injector/mcp/tools.py:201
↓ 1 callersFunctionregister_data_plane_tools
Register Data Plane (runtime / LLM-facing) tools with request shaping and response allowlist.
src/ad_injector/mcp/tools.py:96
↓ 1 callersFunctionrequire_data_scope
Require data (read-only) scope for Data Plane. Raises PermissionError if not allowed.
src/ad_injector/mcp/auth.py:19
↓ 1 callersFunctionrun_server
Run the MCP server using stdio transport.
src/ad_injector/mcp_server.py:63
↓ 1 callersFunctionrun_smoke_check
Run a minimal health check (Qdrant + embedding). Returns: Dict with keys: ok (bool), qdrant (str), embedding (str), error (str | None).
src/ad_injector/ops/smoke_check.py:6
↓ 1 callersFunctionseed_ads
Load demo ads from a JSON file and upsert them via IndexService.
src/ad_injector/cli.py:36
↓ 1 callersMethodto_pinecone_metadata
Convert ad to Pinecone metadata format. Includes enabled for bulk_disable support.
src/ad_injector/models/ad.py:40
↓ 1 callersMethodupsert_batch
( self, ads_with_embeddings: list[tuple[object, list[float]]] )
src/ad_injector/ports/vector_store.py:42
Method__init__
(self, model_id: str = "BAAI/bge-small-en-v1.5")
src/ad_injector/adapters/fastembed_provider.py:13
Method__init__
(self, settings: RuntimeSettings)
src/ad_injector/adapters/qdrant_vector_store.py:27
Method__init__
( self, embedding_provider: EmbeddingProvider, vector_store: VectorStorePort,
src/ad_injector/services/index_service.py:20
Method__init__
( self, embedding_provider: EmbeddingProvider, vector_store: VectorStorePort,
src/ad_injector/services/match_service.py:32
Method__init__
(self, hits: list[VectorHit] | None = None)
tests/test_match_service.py:70
Method_collection
(self)
src/ad_injector/adapters/qdrant_vector_store.py:36
Method_port_range
(cls, v: int)
src/ad_injector/config/runtime.py:63
Functionads_bulk_disable
Set enabled=false for all ads matching the filter. Args: filter_json: JSON object e.g. {"advertiser_id": "x"} or {"ad_id": ["a","
src/ad_injector/mcp/tools.py:306
Functionads_capabilities
Supported placements, constraint keys, embedding model, schema version.
src/ad_injector/mcp/tools.py:179
Functionads_delete
Delete a single ad by ID. Args: ad_id: The ad identifier to delete Returns: JSON confirmation
src/ad_injector/mcp/tools.py:291
Functionads_explain
Return audit trace for a prior match (why eligible/ineligible, filters, scores). Args: match_id: Opaque ID returned with each can
src/ad_injector/mcp/tools.py:154
Functionads_get
Get a single ad by ID (debugging). Args: ad_id: The ad identifier Returns: JSON with ad payload (allowlisted
src/ad_injector/mcp/tools.py:327
Functionads_health
Liveness/readiness: Qdrant and embedding provider reachable.
src/ad_injector/mcp/tools.py:169
Functionads_match
Match ads by text query. Returns similar ads based on semantic similarity. Args: query: Text query to match against ads top_k: Nu
src/ad_injector/mcp_server.py:19
Functionads_match
Match ads by semantic context (read-only). Returns ranked candidates and match_id for explain. Args: context_text: Conversational
src/ad_injector/mcp/tools.py:100
Functionads_upsert_batch
Upsert a batch of ads. Validate Ad schema, embed, upsert. Size limit from config. Args: ads_json: JSON array of ad objects
src/ad_injector/mcp/tools.py:263
Methodbulk_disable
Set enabled=False for all points matching filter_spec. Returns count updated.
src/ad_injector/adapters/qdrant_vector_store.py:219
Methodbulk_disable
Set enabled=False for all ads matching filter_spec. Returns count updated.
src/ad_injector/services/index_service.py:68
Functioncollection_ensure
Ensure the ads collection exists with the given config. Args: dimension: Embedding vector dimension embedding_model_i
src/ad_injector/mcp/tools.py:205
Functioncollection_info
Return metadata about the current ads collection. Returns: JSON with name, points_count, status, dimension, embedding_model_id, s
src/ad_injector/mcp/tools.py:231
Methodcollection_info
(self)
src/ad_injector/adapters/qdrant_vector_store.py:129
Methodcollection_info
(self)
src/ad_injector/services/index_service.py:47
Methodcollection_info
(self)
tests/test_match_service.py:85
Functioncollection_migrate
Optional: run schema migrations / re-index between versions. Args: from_version: Current schema version to_version: T
src/ad_injector/mcp/tools.py:243
Methoddelete_ad
(self, ad_id: str)
src/ad_injector/adapters/qdrant_vector_store.py:203
Methoddelete_ad
(self, ad_id: str)
src/ad_injector/services/index_service.py:61
Methoddelete_ad
(self, ad_id)
tests/test_match_service.py:87
Methoddelete_collection
(self)
src/ad_injector/adapters/qdrant_vector_store.py:123
Methoddelete_collection
(self)
src/ad_injector/services/index_service.py:44
Methoddelete_collection
(self)
tests/test_match_service.py:84
Methodembed
(self, text: str)
tests/test_match_service.py:31
Methodembed_batch
(self, texts: list[str])
src/ad_injector/adapters/fastembed_provider.py:27
Methodembedding_text
Generate the text to be embedded (title + body + topics).
src/ad_injector/models/ad.py:35
Methodensure_collection
( self, dimension: int, embedding_model_id: str | None = None, schema_version:
src/ad_injector/adapters/qdrant_vector_store.py:90
Methodensure_collection
( self, dimension: int | None = None, embedding_model_id: str | None = None, s
src/ad_injector/services/index_service.py:30
Methodensure_collection
(self, dimension)
tests/test_match_service.py:83
Methodget_ad
(self, ad_id: str)
src/ad_injector/adapters/qdrant_vector_store.py:209
Methodget_ad
Return raw ad payload (flat dict from store) or None. For MCP/CLI use.
src/ad_injector/services/index_service.py:64
next →1–100 of 155, ranked by callers