Skip to content

Adapt to upstream gpf-schema-store v0.2.2 - #179

Open
LionelZoubritzky-IGN wants to merge 31 commits into
mainfrom
142-gpfschemastore0.2.0
Open

Adapt to upstream gpf-schema-store v0.2.2#179
LionelZoubritzky-IGN wants to merge 31 commits into
mainfrom
142-gpfschemastore0.2.0

Conversation

@LionelZoubritzky-IGN

Copy link
Copy Markdown
Contributor

Main changes:

  • Upgraded dependency from @ignfab/gpf-schema-store 0.1.x to 0.2.0.
  • Migrated catalog usage to the new API (getCollectionSchema, search, CollectionSearchMatch).
  • Refactored WFS/tool typing to OGC schema types (OgcCollectionSchema, OgcCollectionProperty) and adapted property/enum handling to oneOf.
  • Updated gpf_describe_type and gpf_search_types to reflect the new schema model.

Close #142

Comment thread src/wfs/properties.ts Dismissed

@mborne mborne left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mainly 2 points :

  • Handle date and date-time by checking the format instead of inspecting the name of the property
  • Use the following fixture for geometry properties in tests :
"properties":{
    "geometrie" : {
      "x-ogc-role" : "primary-geometry",
      "format" : "geometry-multipolygon"
    }
}

Comment thread src/tools/GpfDescribeTypeTool.ts Outdated
Comment thread src/wfs/attributeFilter.ts
Comment thread src/wfs/attributeFilter.ts Outdated
Comment thread test/gpf/adminexpress.test.ts Outdated
Comment thread test/gpf/parcellaire-express.test.ts Outdated
Comment thread test/tools/wfs/getFeatureById.test.ts Outdated
Comment thread test/tools/wfs/getFeatureByIdLayer.test.ts Outdated
Comment thread test/tools/wfs/getFeatures.test.ts Outdated
Comment thread test/wfs/execution.test.ts Outdated
Comment thread test/wfs/queryPreparation.test.ts Outdated
Comment thread test/integration/level1-protocol/describe.test.ts Fixed

@mborne mborne left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@LionelZoubritzky-IGN
LionelZoubritzky-IGN force-pushed the 142-gpfschemastore0.2.0 branch 4 times, most recently from afbd2c7 to 83c52f3 Compare July 30, 2026 09:25
@LionelZoubritzky-IGN LionelZoubritzky-IGN changed the title Adapt to upstream gpf-schema-store v0.2.0 Adapt to upstream gpf-schema-store v0.2.1 Jul 30, 2026
@LionelZoubritzky-IGN
LionelZoubritzky-IGN force-pushed the 142-gpfschemastore0.2.0 branch 3 times, most recently from 09e73cf to b7d19b1 Compare August 3, 2026 16:01
@esgn

esgn commented Aug 3, 2026

Copy link
Copy Markdown
Member

Uh ... code was peer reviewed but was it actually tested ? 🤔

  1. https://github.com/ignfab/gpf-schema-store/blob/9cbc62f5611521f1281638ef2f5dd6b25b0c313b/src/ogc-api-feature/types.ts#L72 here properties are defined as record()
  2. https://github.com/QuantGeekDev/mcp-framework does not support record and the output schema renders as string (default type). 🤦🏻‍♂️
"properties": {
  "type": "string"
},
  1. A simple test of gpf_describe_type in mcp-inspector returns the following error
image

@LionelZoubritzky-IGN

Copy link
Copy Markdown
Contributor Author

gpf_describe_type works fine when tested it with an actual LLM... which makes me notice that the LLM is completely skipping structured_content, duh. Sorry for missing this test in mcp-inspector.

Now we have a difficulty: the goal of the main change of gpf-schema-store was to use OGC API Features output schemas. Those inherently have a Record structure, which is incompatible with mcp-framework. Thus, I see four choices:

  1. Just skip output validation of the properties field. In practice: copy the content of zOgcCollectionSchema without the properties field and patch a .catchall(z.unknown()) to cover for it.
  2. Modify the OGC API Feature schema into something compatible with mcp-framework for the tool output. That means rewriting the Record as a list of properties with a name field, as it used to be.
  3. Don't return the actual schema but a link to it, hosted by the proxy: Host upstream catalog's schemas in a dedicated page #186
  4. Get rid of mcp-framework first: Evaluate replacing mcp-framework with the official MCP TypeScript SDK #112

Barring objections I'll start by implementing 1 because it is by far the simplest option. We can revisit this problem as a separate issue later.

@LionelZoubritzky-IGN

LionelZoubritzky-IGN commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Done in 3795617 and regression tested in edd9a81

@LionelZoubritzky-IGN
LionelZoubritzky-IGN force-pushed the 142-gpfschemastore0.2.0 branch 2 times, most recently from 91d9c2f to a6102b0 Compare August 5, 2026 12:30
Comment thread src/tools/GpfDescribeTypeTool.ts Outdated
Comment thread src/tools/GpfDescribeTypeTool.ts Outdated
Comment thread src/tools/GpfDescribeTypeTool.ts
Comment thread src/tools/GpfSearchTypesTool.ts Outdated
Comment thread src/tools/GpfSearchTypesTool.ts
Comment thread test/tools/wfs/getFeatures.test.ts Outdated
Comment thread test/tools/helpers/outputSchema.ts
Comment thread test/integration/level1-protocol/describe.test.ts Outdated
Comment thread test/integration/level1-protocol/describe.test.ts Outdated
Comment thread test/proxy/execute.test.ts
Comment thread src/tools/GpfSearchTypesTool.ts Outdated
Comment thread src/tools/GpfSearchTypesTool.ts Outdated
Comment thread src/tools/GpfSearchTypesTool.ts Outdated
Comment thread src/tools/GpfSearchTypesTool.ts
Comment thread test/tools/gpf-search-types.test.ts Outdated
LionelZoubritzky-IGN and others added 29 commits August 12, 2026 11:40
Co-authored-by: mborne <mborne@users.noreply.github.com>
…tSchema for all tools

Co-authored-by: Emmanuel S. <5435148+esgn@users.noreply.github.com>
Co-authored-by: Emmanuel S. <5435148+esgn@users.noreply.github.com>
Co-authored-by: Emmanuel S. <5435148+esgn@users.noreply.github.com>
… DetailedCollectionSearchMatch

Co-authored-by: Emmanuel S. <5435148+esgn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use proper date/datetime detection mechanism using format Replace id by typename in GpfSearchType Integrate new version of gpf-schema-store

3 participants